Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
"Ramdas Gopinath" — — source: Informix-list mailing list archive (1991-1998)
If you are using INFORMIX-4GL, sqlca.sqlerrd[2] returns the value of
the Serial Value and in ESQL/C use sqlca.sqlerrd[1].
Basically you have to get the 2 array variable in sqlca.sqlerrd.
Gopi.
On 12 Jun 97 at 14:56, Clay Amerault wrote:
} I have a table(a) where I want to use a unique number as the primary
} key. I had intended on using the data type SERIAL to do this, and
} letting the system merely increment it for each INSERT into table(a).
} However, I want to be able to capture the SERIAL value that was just
} inserted into table(a) so I can insert the value into another table(b).
} This would happen in the same transaction as the INSERT into table(a).
} Is there a way to retrieve the SERIAL value that was just INSERTed into
} table(a)? Or would I be better off using a nextkey table to hold the
} next value of the key to be inserted, and basically doing the job of the
} SERIAL data type manually?
} Thanks.
}
} -Clay Amerault
}
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.