i dont know if this room is correct - time out on sql server

User avatar
sal21
PlatinumLounger
Posts: 4370
Joined: 26 Apr 2010, 17:36

i dont know if this room is correct - time out on sql server

Post by sal21 »

I use the code above to connect sql server but have in few case an "time out connection" is correct my string of connection on sql server? existis a method to bypass the prob?

Code: Select all


Set OCONN = New ADODB.Connection
OCONN.ConnectionTimeout = 0
SQL = "Provider=SQLOLEDB;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=" & T_DATABASE & ";Data Source=servername"
OCONN.Open SQL ', adAsyncConnect


User avatar
HansV
Administrator
Posts: 78628
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: i dont know if this room is correct - time out on sql server

Post by HansV »

If OCONN.ConnectionTimeout = 0 doesn't help, the problem is on the server side. The DBA can set a longer connection timeout in SQL Server Enterprise Manager.
Best wishes,
Hans