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.
Link, David A. — — source: Informix-list mailing list archive (1991-1998)
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
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.