re:Re: Reading a Row That was Just Inserted
Posted in 1996
Topics: SQL Development & Query Writing, Connectivity: ODBC / JDBC / .NET, Connectivity: ESQL/C, 4GL & Embedded SQL
----------------------[Reply - Original Message]---------------------- Sent by:James Bennett <james@bi-tech.com> Rajendra Singh wrote: > > In ESQL/C, how do you read a column from a row that was just inserted? > I am particularly interested in reading the contents of a SERIAL > column of a row that was just inserted. > > Thanks! > --- > Rajendra Singh, B. Sc. (Rajendra_Singh@msn.com) > "What is understood need not be discussed." - Loren Adams James replied Serial value after an insert is in sqlca.sqlerrd[1] From ESQL/C Programmers manual, chapter 7 (General Error Handling). HTH James ================================================================ ===== But we also face a problem reading contents of a serial value when the row has been just inserted. We are using Intersolv Q+E ODBC driver for informix 5 at the client end . We do not use ESQL/C . Our programs are in MSVC . To get the value of the serial feild we use a select statement to get the max value. But this is not the correct solution since any other client can in the mean time inset a new row . For this we have to lock the table. Locking is what we dread . We do not want to restrict any other user from entring new records. does anyone have any solution thanks amit