Cancel Statement

  • Thread starter Thread starter Verena Doll
  • Start date Start date
V

Verena Doll

Hi NG,

i want to cancel a sqlConnection.Open-Statement which takes sometimes a lot
of time. how can i practice that this statement i canceled afer 5 seconds,
if the connection is not open?

Thanks.
 
I don;t think you can do this. Have you tried using a worker thread to do
the opening?

Regards
Simon.
 
I have tried using a worker thread. i works fine, but when i close the
application the task is sometimes not terminated.
The reason is, that the first threads was started, but didn´t opened the
connection in five seconds. also the second thread starts and is able to
open the connection.
the first thread hangs and so the application didn´t terminate.

can you help me, please?
 
Back
Top