Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Asynchronous Stored Procedure Call - Issues!

ShefikShefik Member Posts: 1
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


  • bagles1bagles1 Member Posts: 54
    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.

  • Justin BibJustin Bib USAMember Posts: 0

    ___ < /> free ebooks and video tutorials about { C++ Scratch Objective-C JavaScript PHP Ruby Delphi PL/SQL Perl Swift MATLAB Python R Visual Basic Go Assembly C# Visual Basic .NET C Java Lua ML Scala Apex Erlang Crystal FoxPro COBOL Rust Awk Hack Prolog Transact-SQL VBScript Ada D Fortran Lisp Alice Kotlin SAS Dart Bash ABAP LabVIEW Clojure F# Scheme Julia Logo } _________

Sign In or Register to comment.