Stored Procedures and Serial Values -Reply
Posted in 1996
Try the following: (from the Informix Guide to SQL: Syntax, for v7.1, I don't know if this works in the 5.x/4.x world) let serial_value = dbinfo("sqlca.sqlerrd1"); return serial_value; -- Sky +-------(southwel@smtpgw.maricopa.gov)-------+- Maricopa County -+ | Schuyler L. Southwell | Attorney's Office | | Data Management Consultant | 301 W. Jefferson | | Voice: 602-506-8107 **** FAX: 602-506-3970 | Phoenix, AZ 85003 | +--------------------------------------------+--------USA--------+ >>> Peter J. Diaz de Leon <pdiazdeleon@infinityhealthcare.com> 12/29/96 11:44pm >>> I just finished writing a stored procedure that inserts a record into a table with a serial value column. With 4gl to find out what serial value was assigned to the record just inserted I would access SQLCA.SQLERRD[2]. However, how do I find out what serial value was assigned from within the stored procedure. I looked at SQLCA.SQLEERD[2] after I executed the stored procedure from 4gl but all it returned was zero. By the way I am using Informix 4gl 4.16.UC1 and Informix SE 5.07.UC1 on SCO Unixware 2.03 Thanks Peter pdiazdeleon@infinityhealthcare.com