Monday, 19 March 2012

Connect Timeout will not work - SQLOLEDB

It seams as if the Connect Timeout property is not working correctly if the server that one is trying to connect to is down. This is my connection string.

Provider=SQLOLEDB;Pooling=False;Data Source=172.16.136.4;Initial Catalog=Db1;User ID=test;Password=test;Connect Timeout=5;

The timeout is ignored and the connection times out after about 15/20 seconds?

Any ideas?my guess is that your seeing the network connection timeout, not the sql connection timeout...

i.e.

before you can establish a sql connection, you need to establish a network connection|||Yes this seams to be correct , I am now working on a way of checking that the network connection is avaible before issuing a connection. Looking at using some ping routine, Will update this thread with the results

No comments:

Post a Comment