RE: SPL Question
Posted in 2001
I believe the following should work.
Create procedure insert_rec()
returning int;
define serial_val int;
Insert into tab1(my_serial) values (0);Let serial_val = dbinfo('sqlca.sqlerrd1');
return(serial_val);
-----Original Message-----
From: ROBERT B VORBROKER [mailto:ROBVORBROKER@prodigy.net]
Sent: Wednesday, February 07, 2001 3:11 PM
To: informix-list@iiug.org
Subject: SPL Question
OK I'm asking this for a member of our User Group
and don't have the appropriate Manual handy...
IN Stored Procedure I want to insert a record with a SERIAL column
and somehow have the value of the SERIAL field returned to the calling
program.
In 4GL the value of the serial is stored somewhere in SQLCA (unless my mind
has truly turned to MUSH) - please help me remember
Can I pick this off and return this value from a Stored Procedure?
I know a SP returns a status but I thought that was just whether or
not the SP executed properly - but it's been too damm long since I've
written
in SPL.
Someone? Anyone??
Rob Vorbroker