Stop/Cancel executing stored procedure

  • Thread starter Robert A. Broomandan
  • Start date
R

Robert A. Broomandan

Hi all,
I am using an ADO command object in a MS Access 2002 MDB to run a stored
procedure on the SQL server. execution time might take a long time so , I
need to give the user option of stopping the execution. How is that possible?
Any hint would be helpful.

Thanks,
Robert
 
W

Wolfgang Kais

Hello Robert.

Robert A. Broomandan said:
Hi all,
I am using an ADO command object in a MS Access 2002 MDB
to run a stored procedure on the SQL server.
execution time might take a long time so , I need to give the user
option of stopping the execution. How is that possible?

"Execute" the command using the "adAsyncExecute" option.
This allows execution to process while your application continues.
Check the State property to see if the command is still executing.
Use the Cancel method to stop execution, and use the ExecuteComplete event
of the connection object to react on completion.
 
R

Robert A. Broomandan

Thank you Wolfgang.

Wolfgang Kais said:
Hello Robert.



"Execute" the command using the "adAsyncExecute" option.
This allows execution to process while your application continues.
Check the State property to see if the command is still executing.
Use the Cancel method to stop execution, and use the ExecuteComplete event
of the connection object to react on completion.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top