Home All Groups Group Topic Archive Search About
Author
30 Mar 2005 4:04 PM
David de Passos
How Can Set a Query Timeout and Catch the error when the time elapsed.

--


Cumprimentos,
David de Passos
--------------------------------------------------------------
RCSOFT, Lda.
E-Mail: pas***@rcsoft.pt
Móvel: +351 966931639
Telefone: +351 239708708
Fax: +351 239708701
Tel. Directo: +351 239708705 ext. 401

Author
30 Mar 2005 4:18 PM
Herfried K. Wagner [MVP]
"David de Passos" <pas***@rcsoft.pt> schrieb:
> How Can Set a Query Timeout and Catch the error when the time elapsed.

What type of query?

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
30 Mar 2005 4:25 PM
David de Passos
SELECT * FROM TABLE I'm using VB.NET with SQLConnection

Show quoteHide quote
"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:%232dLIPUNFHA.3336@TK2MSFTNGP10.phx.gbl...
> "David de Passos" <pas***@rcsoft.pt> schrieb:
>> How Can Set a Query Timeout and Catch the error when the time elapsed.
>
> What type of query?
>
> --
> M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
> V B   <URL:http://classicvb.org/petition/>
>
Author
30 Mar 2005 4:20 PM
Marina
There is a CommandTimeout on the command objects. When the timeout is
reached, you will get a SqlException. You would probably have to look into
its errors collection to see exactly which error caused the exception to
fire, since that exception can happen for any number of reasons.

Show quoteHide quote
"David de Passos" <pas***@rcsoft.pt> wrote in message
news:e8jebIUNFHA.940@TK2MSFTNGP09.phx.gbl...
> How Can Set a Query Timeout and Catch the error when the time elapsed.
>
> --
>
>
> Cumprimentos,
> David de Passos
> --------------------------------------------------------------
> RCSOFT, Lda.
> E-Mail: pas***@rcsoft.pt
> Móvel: +351 966931639
> Telefone: +351 239708708
> Fax: +351 239708701
> Tel. Directo: +351 239708705 ext. 401
>
>