Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Row Locking and ODBC

Row Locking and ODBC

From: <utlrarunner_at_my-deja.com>
Date: 2000/03/27
Message-ID: <8bonso$2g0$1@nnrp1.deja.com>#1/1

I have a table consisting of a name and a counter that I wish to use to generate unique ids. I want to use the following sql to lock the row I am working on so that another user cannot select the row while I am updating the id.

  select record_id from sequences where
sequence_name = 'mytablename' for update of record_id;

Sending the sql via sql plus works fine but when I send it through ODBC I am getting an ORA-01002 error which I believe means a fetch across commit boundries. What confuses me is that the error I am getting back is on the SQLExecute Call.

In attempting to figure it out I tried doing a commit on the connection but this did not seem to help. I believe that the something in the state of the connection is preventing me from locking the row.

Grant Hickey
ghickey_at_northplains.com
North

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Mon Mar 27 2000 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US