Active Server Pages

Moderators: None (Apply to moderate this forum)
Number of threads: 1751
Number of posts: 4473

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Asynchronous Stored Procedure Call - Issues! Posted by Shefik on 26 Jun 2002 at 9:47 AM
I'm using vbScript to call a stored procedure, which takes several hours to complete. If I use cmd.Execute synchronously, the Web browser obviously times out - waiting for the stored procedure to return control to the script. I need to do this asynchronously, but I'm not able to come up with the right combination of option constants that will A) successfully run the stored procedure, and B) restore control to the browser. A snippit of my code (which accomplishes B but not A) is below - thanks in advance for any assistance.

Set cmd = Server.CreateObject("ADODB.Command")
With cmd
Set .ActiveConnection = cn
.CommandText = "gd.GET_DEPLETIONS"
.CommandType = adCmdStoredProc
.Execute , , adAsyncExecute + adExecuteNoRecords
End With
Report
Re: Asynchronous Stored Procedure Call - Issues! Posted by bagles1 on 28 Jun 2002 at 7:15 AM
Maybe I am missing something here but why are you trying to run a maintenance script through ASP? If you are using Oracle or SQL Server they both have ways in which to schedule and automate the process. If it is taking several hours to do, automation should be the way in which it is done. You could also do it through a VBScript file rather than an asp file and set that to run through Windows Task Scheduler.

-Bagles1



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.