Re: Stored Procedure
Posted in 1994
>>Is there any way to use Stored procedure and triggers under informix-4GL. dberg@informix.com (David I. Berg) writes: >Triggers operate upon an event which occurs to a table. They are >not at all specific to any client tool. >Stored Procedures are executed through 4GL by preparing and executing >a 4GL statement. If the procedure returns any values to the 4GL program, >then a cursor must be used to fetch the returned values. For example: > PREPARE proc_stmt FROM "EXECUTE PROCEDURE procname(?,?,...,?)" > DECLARE proc_curs CURSOR FOR proc_stmt > OPEN proc_curs USING parameter_list > FETCH proc_curs INTO program_variable_list > CLOSE proc_curs To needlessly elaborate: If the SPL RETURNs no values, you can just EXECUTE the PREPARED statement and not bother DECLARE etc for the cursor. ======================================================================= Dennis J. Pimple dennisp@informix.com Opinions expressed Senior Consultant -------------------- are mine, and do not Informix Software Inc Voice: 303-850-0210 necessarily reflect Denver Colorado USA Fax: 303-779-4025 those of my employer.