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 -> Re: ODBC update where current of cursor?

Re: ODBC update where current of cursor?

From: Klaus Behrendt <klaus_at_halstenbach.de>
Date: 1998/04/02
Message-ID: <35236CA4.65DE95B8@halstenbach.de>#1/1

Guy Rouillier wrote:

> I'm trying to do a positioned update, and no matter how I arrange my
> statements, the Oracle ODBC driver keeps returning "SQL State: 34000
> Message: [Oracle][ODBC Oracle Driver]Invalid cursor name." I'm using
> SQLSetCursorName() prior to executing the SELECT statement, and I've
> tried SQLPrepare() of the UPDATE statement both before and after
> SQLExecute() of the prepared SELECT statement. Regardless,
> SQLPrepare() of the UPDATE WHERE CURRENT OF gives the above error.
> How does one do a positioned update in Oracle using ODBC? Oracle
> 7.3.2.2 on Windows NT 4.0, using the latest Oracle ODBC driver.
> Thanks.

Hello Guy,

before preparing the "update ...where current of" statement you have to do a SQLSetPos on the statement where the cursor refers to. Maybe that's the reason for the error message.
By the way, have you tried the "select for update" on the "current cursor"? We have not yet found a means to do this row level locking when using the cursor library. It seems to be unsupported at least when you use the ODBC SDK together with the cursor library.

Regards

--
Klaus Behrendt
Halstenbach ACT GmbH
Breidenbrucher Str. 2
D-51674 Wiehl
Received on Thu Apr 02 1998 - 00:00:00 CST

Original text of this message

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