Re: Stored Procedures and SQLCA record access
Posted in 1996
Peter J. Diaz de Leon <pdiazdeleon@infinityhealthcare.com> wrote in article <5a7ntb$20h@news2.alpha.net>... > > 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 > > - create a procedure (parameter integer) which sets value into global variable - create a "insert" trigger on the table - in this trigger you can obtain new.serial_column - execute this procedure in the trigger - now you have your serial value in the global variable -- HTH, Pepa