Discussion:
[python-win32] adodbapi 2.6.0.7 question
Andrey Glozman
2015-08-20 16:46:16 UTC
Permalink
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.
==============================================================================================
Andrey Glozman
2015-08-20 19:20:33 UTC
Permalink
Please disregard.
We found a way to change timeout on the "connection" object.

Thank you,
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

From: Andrey Glozman
Sent: Thursday, August 20, 2015 12:46 PM
To: 'python-***@python.org'
Subject: adodbapi 2.6.0.7 question

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.
==============================================================================================
Vernon D. Cole
2015-08-21 04:44:46 UTC
Permalink
Andrey:

Good catch. I have added the following to the quickref documentation
for the "connection" class:

.timeout # supply a value for CommandTimeout. Note: the "timeout"
connection value is stored in this attribute, and is used as the connection
timeout. It is then re-used as the command timeout. The user may overcome
this rather goofy "feature" by supplying a different value to this
attribute after the connection is made. The value is in seconds, and will
be used for all subsequent SQL commands.
Please disregard.
We found a way to change timeout on the “connection” object.
Thank you,
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
*From:* Andrey Glozman
*Sent:* Thursday, August 20, 2015 12:46 PM
*Subject:* adodbapi 2.6.0.7 question
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.
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.
==============================================================================================
­­
_______________________________________________
python-win32 mailing list
https://mail.python.org/mailman/listinfo/python-win32
Loading...