OCCI (v11g) statement: INSERT INTO...VALUES...RETURNING ROWID INTO...
679210Jan 11 2009 — edited Jan 12 2009I'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!