nick at lurcher.org
Thu May 17 00:33:13 BST 2012
On 16/05/12 15:36, Antony Davies wrote:
> Hi Nick, I realise this isnt really part of the driver manager, but
> would you know off hand
> if the oracle odbc driver (unsure as to the versino) supports this
> functionality (I guess I should probably just write a small program
> and see if I get an error).
I think its unlikely. The only way I know of running timeouts via OCI
involve setting up a timer and calling OCIBreak when it expires. Thats
ok in a application, but in my opinion, running a timer in a ODBC driver
is asking for trouble, as it assumes that the calling app is not making
use of the same timer. Bad things will happen.
We (Easysoft) can do it in our Wire Protocol driver as that has the
advantage of talking directly at the socket level, so we can use
select() or poll() to give the effect of the timer without having to
setup a callback handler.
> Also, is there anything in the driver manager (or perhaps in the
> oracle driver) to allow a connect to try multiple times with a delay
> (trying to avoid doing this at the app level if the functionality is
> already available).
No, I have always felt that this is only sensible to do in the
application or driver level, as every app making use of it would need a
different plan as to what to do when it failed. It makes sense in the
driver, as it just needs a list of targets to connect to, and the driver
can report back to the app as if a single connect was tried and failed,
and makes most sense in the application layer as there the coder knows
exactly what is needed.
More information about the unixODBC-support