I have been tryying hard to set the timeout attribute for an ODBC statement handle. SQL_ATTR_CONNECTION_TIMEOUT. I have tried this test with both Oracle 90 ODBC and Microsofts ODBC for Oracle.

I run a simple experiment after successfully setting the statement handle. I lock the target table using
lock table target in exclusive mode;

Then I run my application, which implements my Timeout. This application is trying to update target. Now my query should hang only as
the timeout value assigned using SQLSetStmtAttr.

However this never happens and my application hangs indefinitely.

I had to provide a dirty work around for this.

Does anyone have any experiences to share??