Re: Getting Serial Value
Posted in 1997
ontop — — source: Informix-list mailing list archive (1991-1998)
Tauren Mills wrote: > Am I missing something? Is there a way to return the value that the > SERIAL column gets set to? Or is there a way to at least return the > ROWID of the newly inserted column? I'm using an "INSERT INTO > customers" statement to insert a new row will all null values except > the > primary key. Can I get the info I need if I use an updatable cursor? > Yes, you are missing the fact that the sqlca structure contains a field sqlerrd[1] which contains the generated value for a serial column. I include sqlca.h in my ESQL/C programs to be able to access this field.