Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Row Locking and ODBC
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