Connecting Tech Pros Worldwide Forums | Help | Site Map

Query timeout

David de Passos
Guest
 
Posts: n/a
#1: Nov 21 '05
How Can Set a Query Timeout and Catch the error when the time elapsed.

--


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




Herfried K. Wagner [MVP]
Guest
 
Posts: n/a
#2: Nov 21 '05

re: Query timeout


"David de Passos" <passos@rcsoft.pt> schrieb:[color=blue]
> How Can Set a Query Timeout and Catch the error when the time elapsed.[/color]

What type of query?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Marina
Guest
 
Posts: n/a
#3: Nov 21 '05

re: Query timeout


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.

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


David de Passos
Guest
 
Posts: n/a
#4: Nov 21 '05

re: Query timeout


SELECT * FROM TABLE I'm using VB.NET with SQLConnection

"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:%232dLIPUNFHA.3336@TK2MSFTNGP10.phx.gbl...[color=blue]
> "David de Passos" <passos@rcsoft.pt> schrieb:[color=green]
>> How Can Set a Query Timeout and Catch the error when the time elapsed.[/color]
>
> What type of query?
>
> --
> M S Herfried K. Wagner
> M V P <URL:http://dotnet.mvps.org/>
> V B <URL:http://classicvb.org/petition/>
>[/color]



Closed Thread


Similar Visual Basic .NET bytes