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.
Peter Hamm — — source: Informix-list mailing list archive (1991-1998)
Hello,
how do I execute a function in ESQL/C that gets one argument an returns
a collection?
To explan a short description of the UDR:
CREATE FUNCTION return_set( object INT)
RETURNING coll_var
DEFINE coll_var SET( INTEGER NOT NULL );
SELECT value INTO col_var
FROM ...
WHERE ... AND
attribut = object;
RETURN coll_var;
END FUNCTION
Is is then like this to execute this function in ESQL/C?
EXEC SQL BEGIN DECLARE SECTION;
CLIENT COLLECTION SET (INT NOT NULL) set_var;
EXEC SQL END DECLARE SECTION;
.
.
.
EXEC SQL
ALLOCATE COLLECTION :set_var;
EXEC SQL
execute function return_set(187132) INTO :set_var;
Thanks for your advice.
Peter Hamm
Your privacy choices
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.