reset ConnectionTimeout in ADO connectionPtr | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

reset ConnectionTimeout in ADO connectionPtr


I need to allow certain queries in my application to have much longer than
the 60 seconds default ConnectionTimeout. For everything else, I’d like to
reset it to default. Would this be an expensive operation?
I don’t think this is an expensive operation. There will be little time consumed in resetting the connection properties but I think that will not be considerable when we comapre it to execution period of 60 secs. Gaurav
Moderator
Man thrives, oddly enough, only in the presence of a challenging environment- L. Ron Hubbard

If you are referring to the time allowed for the query to run, this is not the connection timeout property. You need to look into the CommandTimeout property, which has a default of 30 seconds. So for the queries that you need to let run for more then 30 seconds, adjust the timeout value accordingly, and if you want the default value for other queries, set the timeout value to 30 seconds.
"How do you expect to beat me when I am forever?"
Thanks Roy.
You are right. It’s the CommandTimeout.
I guess I don’t need to reset this parameter once I am done with this command and
recordset. The next command and recordset will instantiate/initialize themselves
and therefore should take the defaults.
quote:Originally posted by royv If you are referring to the time allowed for the query to run, this is not the connection timeout property. You need to look into the CommandTimeout property, which has a default of 30 seconds. So for the queries that you need to let run for more then 30 seconds, adjust the timeout value accordingly, and if you want the default value for other queries, set the timeout value to 30 seconds.
"How do you expect to beat me when I am forever?"

]]>