SE and SQLCA question
Posted in 1996
Hello, out there.
Just a small question:
I am working with 4GL 4.15 and SE 5.06 on a Digital UNIX system (5.3C)
and I needed to get the rowid of the rows of a table I was managing.
Here it is a little example:
declare xxx cursor for
select something from sometable
foreach xxx into yyy
insert into someothertable values (rowid_of_the_selected_row)
end foreach
lot_of_stuff()
update sometable set (somecolumns) = (somevalues)
where somecondition <- only one row is updated!
insert into someothertable values (rowid_of_the_updated_row)
lot_of_snipped_stuff()
According to the manuals, I supposed to find this value on
the field SQLCA.SQLERRD[6] after any (quoting) SQL statement on
the table.
I noticed that this was true only for UPDATE statements but not for SELECT
(I didn't test INSERT).
After a while, I worked around the - possible - bug by explicitatig the
rowid request in my SELECTs, but I think this is a little nasty.
Any comments or suggestions ?
Thanks a lot.
Andrea
deangeli@sienanet.it