By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,693 Members | 1,267 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,693 IT Pros & Developers. It's quick & easy.

Query timeout

P: n/a
How Can Set a Query Timeout and Catch the error when the time elapsed.

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

Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"David de Passos" <pa****@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/>
Nov 21 '05 #2

P: n/a
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" <pa****@rcsoft.pt> wrote in message
news:e8*************@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: pa****@rcsoft.pt
Móvel: +351 966931639
Telefone: +351 239708708
Fax: +351 239708701
Tel. Directo: +351 239708705 ext. 401

Nov 21 '05 #3

P: n/a
SELECT * FROM TABLE I'm using VB.NET with SQLConnection

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
"David de Passos" <pa****@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/>


Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.