Skip to Main Content

Oracle Developer Tools for Visual Studio

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

OCCI (v11g) statement: INSERT INTO...VALUES...RETURNING ROWID INTO...

679210Jan 11 2009 — edited Jan 12 2009
I'm trying to do a very simply thing but haven't gotten any luck so far and time is running out for us...so please help!

I need to do an INSERT INTO... and return the newly inserted ROWID value to do a subsequent update. Here is my SQL:

"INSERT INTO TESTTABLE(MyNumberField, MyTextField, MyCLOBField, MyBLOBField, MyDateField) VALUES (:1,:2,:3,:4,:5) RETURNING ROWIDTOCHAR(ROWID) INTO :6"

Everything works fine except for the returning ROWID value. All I got is a blank string back.

If I just simply return the ROWID as follows, it works:

"SELECT ROWIDTOCHAR(ROWID) FROM TESTTABLE"

If I return other data type in the "RETURNING" clause, eg. number, string, etc., it works fine as well.

So...the problem that I'm having seems to be with the ROWID in the RETURNING clause. Am I missing something here or the construct simply not being supported by OCCI? I'm using OCCI 11g and our codes is compiled in VS2008 Professional Edition.

Please help!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 9 2009
Added on Jan 11 2009
1 comment
3,283 views