PC Review


Reply
Thread Tools Rate Thread

Cancel Statement

 
 
Verena Doll
Guest
Posts: n/a
 
      3rd Jul 2006
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.


 
Reply With Quote
 
 
 
 
Simon Hart
Guest
Posts: n/a
 
      3rd Jul 2006
I don;t think you can do this. Have you tried using a worker thread to do
the opening?

Regards
Simon.

"Verena Doll" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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.
>
>



 
Reply With Quote
 
Verena Doll
Guest
Posts: n/a
 
      4th Jul 2006
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?
"Simon Hart" <(E-Mail Removed)> schrieb im Newsbeitrag
news:(E-Mail Removed)...
> I don;t think you can do this. Have you tried using a worker thread to do
> the opening?
>
> Regards
> Simon.
>
> "Verena Doll" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > 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.
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Workbook_BeforeClose(Cancel As Boolean) - Cancel won't work gpmichal Microsoft Excel Setup 2 22nd Apr 2010 09:23 PM
How do I cancel a 57MB email when cancel does not work? AZJP Microsoft Outlook Discussion 3 16th Jun 2009 05:51 AM
CancelEventArgs.Cancel - How Event Raising Code Know if Client Set .Cancel=true Smithers Microsoft C# .NET 3 24th Sep 2007 02:30 AM
Disabling 'Cancel' option when saving work (Yes/No/Cancel) jsmarsha@wisc.edu Microsoft Excel Programming 0 11th Jul 2006 09:28 PM
Cancel Macro is user selects 'cancel' at save menu =?Utf-8?B?TWFyaw==?= Microsoft Excel Programming 1 6th Apr 2005 05:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:45 AM.