Q: Trying to update a table using ROWID
From: Chun Wong <cwg_at_cix.compulink.co.uk>
Date: 1995/06/13
Message-ID: <DA4KLr.H9C_at_cix.compulink.co.uk>#1/1
Date: 1995/06/13
Message-ID: <DA4KLr.H9C_at_cix.compulink.co.uk>#1/1
I'm trying to update a table using the ROWID of the table which I get from a cursor in ProC, something like;
EXEC SQL DECLARE a_cursor CURSOR FOR SELECT t1.field1, t2.flag, t3.name, t1.rowid FROM table1 t1, table2 t2, table3 t3 WHERE t1.code = t2.code AND t2.code = t3.code; OPEN... while(1) { FETCH... do C processing... EXEC SQL UPDATE table1 SET... WHERE rowid = :row_id; } CLOSE ...
Trouble is, I seem to get an invalid ROWID error when I try to update. Is this because my cursor is selecting from more than one table?
Looking at the rowid in C appears to be correct as I've declared :row_id as a char which the manual says is the equivalent to VARCHAR2.
Any help would be appreciated. Many thanks.
Chun. Received on Tue Jun 13 1995 - 00:00:00 CEST