connection timeout

  • Thread starter Thread starter Ashish
  • Start date Start date
A

Ashish

can we specify connection timeout in the connection string for
oledbconnection object ?, because i have a project where i dont have
access to code but i have access to connection string, and due to the
our large database the search timesout frequently
any help would be appreciated
thanks
-ashish
 
All connections are derived from IDbConnection and one of it's properties is
ConnectionTimeout (which is read only so has to be set via the connection
string). However, I've looked around and saw some examples on doing it with
SQL Server, I can't post an example of doing it with Oledb....but try adding
Connect Timeout = x or ConnectionTimeout = x , I think one of those will
probably work.

HTH,

Bill
 
William said:
All connections are derived from IDbConnection and one of it's properties is
ConnectionTimeout (which is read only so has to be set via the connection
string). However, I've looked around and saw some examples on doing it with
SQL Server, I can't post an example of doing it with Oledb....but try adding
Connect Timeout = x or ConnectionTimeout = x , I think one of those will
probably work.

HTH,

Bill
thanks bill
i tried "xxx;xxx;xxx;connect timeout=30" and it worked
-ashish
 
Ah no. Connection timeout has NOTHING to do with query timeouts. If your
search is timing out, you can change the QUERY timeout by setting the
Command object's CommandTimeout property. Note that setting 0 as "infinite"
does not work without applying a patch to the framework.

hth

--
____________________________________
Bill Vaughn
MVP, hRD
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
If this worked (setting the Connection timeout), then there was something
else wrong--it does not affect the time the server waits for a query to
complete.

--
____________________________________
Bill Vaughn
MVP, hRD
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
Back
Top