Andrey Glozman
2015-08-20 16:46:16 UTC
Greetings,
We are trying to use the adodbapi 2.6.0.7 and unable to change ADO CommandTimeout after connection is established. Would you be able to help us understand the best way to do it?
Based on the adodbapi code - the only "timeout" parameter a user can provide is at the connection object instantiation. That timeout value is being used as a ConnectionTimeout (to connect to a server) and a CommandTimeout (to execute statement).
Also, it is not clear how one can change CommandTimeout in between queries.
Example case scenario:
1) Connect to a server (here we need ConnectionTimeout). Typically default 30 seconds is acceptable
2) Run Query1 - it might be some sort of a ping / database availability / user permissions / etc. (Here we need CommandTimeout). In many cases default 30 seconds is too much.
3) Run Query2 - it might be a job / report / process - (here we need different CommandTimeout than above). In some cases it takes minutes to run.
Again, it seems that with existing implementation the above use case scenario is not possible.
Thank you in advance,
Andrey Glozman
Ellington Management Group, LLC
53 Forest Avenue, Old Greenwich, CT 06870
P: 203.409.3574, M:203.912.7099 F: 203.698.0869
=============================================================================================
Email transmissions can not be guaranteed to be secure or error-free, as information
could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain
viruses. The sender therefore does not accept liability for any errors or omissions in
the contents of this message which arise as a result of email transmission. In addition,
the information contained in this email message is intended only for use of the
individual or entity named above. If the reader of this message is not the intended
recipient, or the employee or agent responsible to deliver it to the intended recipient,
you are hereby notified that any dissemination, distribution,or copying of this communication,
disclosure of the parties to it, or any action taken or omitted to be taken in reliance on it,
is strictly prohibited, and may be unlawful. If you are not the intended recipient please
delete this email message.
==============================================================================================
We are trying to use the adodbapi 2.6.0.7 and unable to change ADO CommandTimeout after connection is established. Would you be able to help us understand the best way to do it?
Based on the adodbapi code - the only "timeout" parameter a user can provide is at the connection object instantiation. That timeout value is being used as a ConnectionTimeout (to connect to a server) and a CommandTimeout (to execute statement).
Also, it is not clear how one can change CommandTimeout in between queries.
Example case scenario:
1) Connect to a server (here we need ConnectionTimeout). Typically default 30 seconds is acceptable
2) Run Query1 - it might be some sort of a ping / database availability / user permissions / etc. (Here we need CommandTimeout). In many cases default 30 seconds is too much.
3) Run Query2 - it might be a job / report / process - (here we need different CommandTimeout than above). In some cases it takes minutes to run.
Again, it seems that with existing implementation the above use case scenario is not possible.
Thank you in advance,
Andrey Glozman
Ellington Management Group, LLC
53 Forest Avenue, Old Greenwich, CT 06870
P: 203.409.3574, M:203.912.7099 F: 203.698.0869
=============================================================================================
Email transmissions can not be guaranteed to be secure or error-free, as information
could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain
viruses. The sender therefore does not accept liability for any errors or omissions in
the contents of this message which arise as a result of email transmission. In addition,
the information contained in this email message is intended only for use of the
individual or entity named above. If the reader of this message is not the intended
recipient, or the employee or agent responsible to deliver it to the intended recipient,
you are hereby notified that any dissemination, distribution,or copying of this communication,
disclosure of the parties to it, or any action taken or omitted to be taken in reliance on it,
is strictly prohibited, and may be unlawful. If you are not the intended recipient please
delete this email message.
==============================================================================================