Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Databases
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 20th, 2005, 02:29 PM
Authorized User
 
Join Date: Sep 2004
Location: , , USA.
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?

Reply With Quote
  #2 (permalink)  
Old January 20th, 2005, 04:17 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
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
Reply With Quote
  #3 (permalink)  
Old January 20th, 2005, 04:26 PM
Authorized User
 
Join Date: Sep 2004
Location: , , USA.
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.

Reply With Quote
  #4 (permalink)  
Old January 21st, 2005, 09:11 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
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
Reply With Quote
  #5 (permalink)  
Old January 21st, 2005, 09:27 AM
Authorized User
 
Join Date: Sep 2004
Location: , , USA.
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?!

Reply With Quote
  #6 (permalink)  
Old January 21st, 2005, 03:23 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
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
Reply With Quote
  #7 (permalink)  
Old January 21st, 2005, 04:11 PM
Authorized User
 
Join Date: Sep 2004
Location: , , USA.
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.



Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 11:35 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.