How to get the last Serial8 value
Posted in 1999
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
1. Did any one found a way to realize the last inserted Serial8 value within ESQLC program? -- Beni Hoffman beni@mate.co.il POBox 41 tel. 972-3-5369061/ext. 26 Savion 56530 fax 972-3-5369062 ISRAEL
beni hoofman wrote: > > 1. Did any one found a way to realize the last inserted Serial8 value within > ESQLC program? > > -- > Beni Hoffman > beni@mate.co.il > POBox 41 tel. > 972-3-5369061/ext. 26 > Savion 56530 fax > 972-3-5369062 > ISRAEL You've got the SQLCA - Record. After an INSERT You find in SQLCA.SQLERRD[2] the value of the serial value. Another possibility is to use the DBINFO-function. Wolfgang
Wolfgang Zager wrote: > > beni hoofman wrote: > > > > 1. Did any one found a way to realize the last inserted Serial8 value within > > ESQLC program? > > > > -- > > Beni Hoffman > > beni@mate.co.il > > POBox 41 tel. > > 972-3-5369061/ext. 26 > > Savion 56530 fax > > 972-3-5369062 > > ISRAEL > > You've got the SQLCA - Record. After an INSERT You find in > SQLCA.SQLERRD[2] the value of the serial value. > Another possibility is to use the DBINFO-function. I don't think you can use sqlca for SERIAL8 since the sqlerrd array is longs not LONG LONG. Fetching DBINFO into a LONG LONG or DECIMAL(19,0) may be the only option. Has anyone checked the manual? Art S. Kagel