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.
Jonathan Leffler — — source: Informix-list mailing list archive (1991-1998)
>From: declan@MCS.COM (Declan O'Reilly)
>Subject: ESQL & Stored Procedures
>Date: 13 Jul 1994 14:29:36 -0500
>X-Informix-List-Id: <news.7586>
>
> To call a stored procedure from ESQL/C do you have to use
> Dynamic SQL or can you say something like as follows
>
> EXEC SQL declare procursor for
> execute my_procedure into :return_var1, :return_var2
Give or take some syntactic details, you can do what you want:
func()
{
EXEC SQL BEGIN DECLARE SECTION;
int return_var1;
int return_var2;
EXEC SQL END DECLARE SECTION;
EXEC SQL DECLARE c_proc CURSOR FOR
EXECUTE PROCEDURE my_procedure(1) INTO :return_var1, :return_var2;
}
Yours,
Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>
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.