Page 1 of 1

[BUG][ODAC VCL.NET] ORA-00972 : identifier is too long

Posted: Wed 29 Aug 2007 15:08
by nschmied
Hi,
I have a bug with a table have long field name.
For reproduice this error,
create a table like this

Code: Select all

CREATE TABLE DOC_POS_DET_COPY_DISCHARGE
(
  DOC_POS_DET_COPY_DISCHARGE_ID  NUMBER(12)     NOT NULL,
  DIC_PDE_FREE_TABLE_1_ID        VARCHAR2(10 CHAR),
)
You can see this first field with a long name.

And after use ODAC demo and test SMART query, with this command

Code: Select all

SELECT * FROM DOC_POS_DET_COPY_DISCHARGE
And with lock mode Immediate, ODAC generate a SQL commande for lock the row. Like this

Code: Select all

SELECT * FROM DOC_POS_DET_COPY_DISCHARGE
WHERE
  DOC_POS_DET_COPY_DISCHARGE_ID = :Old_DOC_POS_DET_COPY_DISCHARGE_ID
FOR UPDATE NOWAIT
But the long parametername is a issue, and oracle raise a error:ORA-00972 : identifier is too long.

Thank's for your help.

Posted: Wed 29 Aug 2007 15:10
by nschmied
Sorry I miss to say this error raise when I whant to edit a existe data. :wink:

Posted: Thu 30 Aug 2007 07:23
by Plash
You can include ROWID into your SELECT statement. In this case ROWID will be used in the WHERE clause of update queries.