ODBC Cursor library strips off FOR UPDATE clause

From: Warren C. Roberts <warren_at_bhi.com>
Date: 1997/08/06
Message-ID: <MPG.e527e591a9f1824989680_at_news.secure.bhi.com>#1/1


Here is an ODBC problem that I've been fighting with for awhile.

My plaform

     ODBC 2.x on Windows NT4.0.
     Oracle is the backend db.
     I've tried this with the Oracle 1.15 * 1.16 drivers

The problem
If I set the ::SQLSetConnectOption(conn, SQL_ODBC_CURSORS, SQL_CUR_USE_ODBC) option and try to execute a SELECT statement containing a FOR UPDATE NOWAIT clause the entire for update clause is removed from the statement before it is sent to the database. As a result the selected records don't get locked by the database. If I don't set SQL_ODBC_CURSORS connect option then the driver passes the for update clause through just fine.

I need to use the cursor library but I also need the ability to lock certain records in the database. Is there a trick I can use to get the for update clause passed through? This same scenario works fine on a 16 bit version of my software.

Any help would be appreciated.
Warren Roberts
Boulder, Co Received on Wed Aug 06 1997 - 00:00:00 CEST

Original text of this message