Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-05-16 : 10:17:40
|
| shanthi writes "Hi,i would like to stop the execution of a SP when i click a 'STOP' button in my VB application. I used Command_name.close and command_name.cancel for stopping the SP execution abruptly. but the execution gets stopped only after executing the SP fully. PLs guide me.rgds,shanthi" |
|
|
royv
Constraint Violating Yak Guru
455 Posts |
Posted - 2002-05-16 : 10:34:57
|
| Have you tried executing the close property of the connection object?*************************Someone done told you wrong! |
 |
|
|
jshanz
Starting Member
1 Post |
Posted - 2002-05-17 : 02:01:43
|
| I did try executing the connectionobject.close.i am executing the SP in asynchronous mode,i thinkbcos of it although the connectionobject.close is executed the Spis running at the server side and i can see it in the query analyser.How about using 'connectionobject.BeginTrans' ,'connectionobject.CommitTrans' ? |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-05-17 : 08:48:31
|
| There is a Cancel method for both Command and Connection objects. I imagine that you're using a Command object to execute the stored procedure, if so then use the Cancel method on the Command object.You can get the ADO documentation from http://www.microsoft.com/data/download.htm from the MDAC SDK package; download it and install it, and it will create links to the ADO help file (ADO260.CHM) It details all of the Connection and Command object methods and how they work. |
 |
|
|
|
|
|