Re: 4GL question
Posted in 1992
Topics: Error Codes & Troubleshooting, Connectivity: ESQL/C, 4GL & Embedded SQL
> > I have a question (which might be silly one): > I am new to I4GL. When I insert a data into a table, where primary > key is define as serial, how do I get back the assigned ID number. > Right now I SELECT the row after INSERT with all the known values > and read the PK column value. It seems to me that this is not efficient > and there must be a better way. > > Thaddeus Konar > Hewlett Packard > UTD/Corvallis > thaddeus@cv.hp.com > (503) 750-3461 > > After the insert, if sqlcode == 0, sqlca.sqlerrd[2] will contain the serial number of the last inserted row. Raj. -- =**= - =*= - =*= - =*= - =*= - =*= - =*= - =*= - =*= - =*= - =*= - =*= - =**= Raj Muralidharan | Voice : (301) 989-5042 Bell Atlantic Information Systems | Fax : (301) 989-5040 2221-L Broadbirch Drive | Internet : ddntswa@bell-atl.com Silver Spring, MD 20904-1985 | UUCP : bell-atl.com!ddntswa =**= - =*= - =*= - =*= - =*= - =*= - =*= - =*= - =*= - =*= - =*= - =*= - =**=