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

Connectoon timeout

P: 4
I am not able to modify the connection timeout time using following connection string
"Provider=SQLOLEDB.1;Persist Security Info=False;PWD=PWD;User ID=UID;Initial Catalog=DB;Data Source=servername;Connect Timeout=60"
or
"Provider=SQLOLEDB.1;Persist Security Info=False;PWD=PWD;User ID=UID;Initial Catalog=DB;Data Source=servername;Connect Timeout=10"

in both the above cases the timeout happens in 30 seconds.
can some one help
Oct 15 '09 #1
Share this Question
Share on Google+
4 Replies


Delerna
Expert 100+
P: 1,134
Hmm, I have no issue adjusting timeouts but I do it this way
Expand|Select|Wrap|Line Numbers
  1. cnn.Open("Provider=SQLOLEDB.1;Persist Security Info=False;PWD=PWD;User ID=UID;Initial Catalog=DB;Data Source=servername");
  2. cnn.CommandTimeout = 60;
  3.  
Have you done any research on what "ConnectTimeout" actually does?
I have a feeling that it is a timeout for the actual connection creation only.
Or is that what you are trying to do and I have totally missunderstood the question
Oct 15 '09 #2

P: 4
Thanks for msg
The method pointed out by you is also not working I had tries that earlier.
The ConnectTimeout is a property that forces any quarry run on the connection to timeout or terminate if the server does not respond in the given timeout parametere - in this cas 60 secs (for this particualar querry). When u re-send the querry the ConnectTimeout is resetted and times out this querry again if there is no response from server in 60secs.
Regards
Oct 16 '09 #3

P: 4
I may be wrong about the defination I just posted. let me chek and post again
Oct 16 '09 #4

P: 4
you are right
"ConnectTimeout" it is a timeout for the actual connection creation only.
the command for querry timeout is
cnn.CommandTimeout = 60;
This is working fine,
Thanks it was only after ur msg that I could resolve it.
Oct 16 '09 #5

Post your reply

Sign in to post your reply or Sign up for a free account.