Re: Stored Procedures and Serial Values -Reply
Posted in 1996
Sky Southwell <SOUTHWEL@smtpgw.maricopa.gov> wrote in article <5a8lt6$lst@cssun.mathcs.emory.edu>... > 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; > This works in DSA 6.0 or higher.... You must use trigger and set the new value into global variable. -- HTH, Pepa > >>> 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 > >