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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Waiting on Stored Procedures

Status
Not open for further replies.

bassguy

Programmer
Jun 21, 2001
336
US
Hello all,

A quick question.

Typically with this code:


me.sqlconnection1.open()
me.cmd_mystoredProc.executenonquery
me.Sqlconnection1.close



my windows app will:
open the connection
run the stored proc, waiting for it to finish
Close the connection


I am trying to get the Stored proc to start and then go on without it, as I am not waiting for anything back and it is a lengthy procedure running as long as an hour.

any suggestions would be appreciated


Bassguy

 
Use threading. Start a new thread get the proc to run in that thread then go back to the main one to continue working with your app. That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
I do not even need the app to be running anymore....I would like to kick off the stored proc and close down.

 
Use a trigger or something of that sort in SQL and leave the application out of the picture all together if it needs to go off at a specific time.

If you need the app to start this SP, then you will need to create a thread and call it cause you are going to be expending the system process either way.

That really is your only 2 options.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top