Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 20th, 2005, 02:29 PM
Authorized User
 
Join Date: Sep 2004
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
Default Right after DTS, query doesn't work anymore?!

Hi, all,

Please confirm if this is true.

I clear the destination table before I run DTS package from an ASP page, then after I complete the DTS, I check the destination table's row count to see if the DTS has completed successfully.

However, this execution of the simple SQL query inside the ASP doesn't seem to be working anymore after the run of DTS?!

I use the same query before the table clearing and DTS execution, and it returns the correct row count.

Does this happen to you?

 
Old January 20th, 2005, 04:17 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

No, are you uninitializing the package and closing all of the DTS objects after you are done with them? Are you sure the DTS package is done?

Brian
 
Old January 20th, 2005, 04:26 PM
Authorized User
 
Join Date: Sep 2004
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This is the code I use:
Code:
    Set objDTSPackage = CreateObject("DTS.Package")
    objDTSPackage.LoadFromSQLServer "server", "", "", 256,,,,"PkgName" 
    objDTSPackage.FailOnError = true
    objDTSPackage.Execute
    objDTSPackage.UnInitialize 
    Set objDTSPackage = Nothing
I've tried to use server-side code to do this previously, but since it involved IIS permission issue that I can't touch at the moment, I switched to use client-side VBScript. And it does seem to complete the DTS package - at least when I use Enterprise Manager to check the row count, it seems to be correct.
However, if I execute the same SQL query or stored procedure to check row count in ASP page, it doesn't give me any error, but it just gives me 0 row count - even though there're records in the table.

 
Old January 21st, 2005, 09:11 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

OK, with ASP are you returning the rowcount as an output parameter or as a select statement, in your procedure? I'm not quite sure why that may be.

Brian
 
Old January 21st, 2005, 09:27 AM
Authorized User
 
Join Date: Sep 2004
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
Default

After the DTS execution, I use "SELECT COUNT(*) row FROM tbl_Destination" currently. But I also tried @@rowcount and a couple of different variations - thinking maybe I missed something.

Since I also do "Delete from tbl_Destination" BEFORE the DTS to clear the table, so I tried do the delete AFTER DTS to see if the same stored procedure works.

So basically this is what's happening at the moment - Delete and checking row counts on destination table all work fine before the DTS execution, but the same stored procedure or query don't give error and don't give results either after I run DTS.

It's like the destination table has not been released?!

 
Old January 21st, 2005, 03:23 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Does it actually complete loading the page, or does the page time out also? If it completes loading the page, the package isn't getting hung up. Weird.

Brian
 
Old January 21st, 2005, 04:11 PM
Authorized User
 
Join Date: Sep 2004
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
Default

All the queries or stored procedure executed after DTS execution seem to run through without a problem (i.e. no error comes back), it just doesn't provide any result.

It's very weird, I guess this is either very hard to resolve or very easy - due to some stupid mistake on my part - I just hope it's the latter.








Similar Threads
Thread Thread Starter Forum Replies Last Post
DTS Import/Export wizard query Neal SQL Server 2000 0 April 3rd, 2007 10:19 AM
My ActiveX doesn't work anymore stenci Pro VB 6 0 April 2nd, 2006 02:21 AM
DTS Query smujib SQL Server DTS 2 April 19th, 2005 03:36 PM
Scheduled DTS package does not work niravp SQL Server DTS 5 May 26th, 2004 11:38 AM
not work in sql query like '%[%' vincentc SQL Server 2000 2 October 9th, 2003 03:34 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.