|
-
Dec 26th, 2008, 02:16 AM
#1
Thread Starter
Member
How to define Stored Procedure is Finished
In a Client Server environment, i run two command that call stored procedure in sql server.
one stored procedure generate data
and the other one calculate the data that generated from first sp
but how is the client know that the data in first command is finished, so the client can call the second command?
thanx
-
Dec 26th, 2008, 03:56 AM
#2
Re: How to define Stored Procedure is Finished
When the .Execute method is done...
Unless you are firing up a background worker thread and calling the SP so you can do other processing, a call to the SP halts the calling sub until either you get a timeout error (sp took too long to complete) or the sp is done and returns back to the code.
-tg
-
Dec 26th, 2008, 06:49 AM
#3
Thread Starter
Member
Re: How to define Stored Procedure is Finished
hi techgnome,
thanx.
well in the practice, the first sp isn't finished yet but in vb code i still can execute next code after the execute method and i'm not using thread.
-
Dec 26th, 2008, 07:44 AM
#4
Re: How to define Stored Procedure is Finished
What languare are you using? Only when you are executing them Asynchronously that the vb code would allow you to continue after starting the execution of a Stored Procedure, if not then it will wait until it is finished.
-
Dec 27th, 2008, 06:19 AM
#5
Thread Starter
Member
Re: How to define Stored Procedure is Finished
that time i used VB6, but i think would be same in .NET either.
i forget did i use it Asynchronously or not. because since that, i just doing a sequential request, and calculate in the client side and update the table and so on, for each row. that is so unefficient , and the Lan Traffic too. 
sorry for my bad english.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|