Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Don't want to wait for the results SP Call

Status
Not open for further replies.

SilentWings

Programmer
Apr 24, 2002
27
0
0
PT
Hi ppl,

I have a VB program that executes stored procedures in SQLServer2000. I need to launch that execution and don't want to wait for the results of that Stored Procedure Call.

How can I do that?

Thanks in advance...
 
I assume that you're using an ADO Command object to call the Stored Procedure. If not then you must change your code.

When you call the Execute method of the Command object specify adAsyncExecute or adAsyncFetchNonBlocking in the Options parameter.

When the execution is complete an ExecuteComplete event will be raised on the Connection object so you'll need to have declared that WithEvents.

You can find all the details in MSDN.


 
Or if you don't want the results at all then put the sp call into a table and have a scheduled job on the server that runs commands from that table.

======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top