help on run procedures
Posted in 2001
Topics: General Discussion
does anyone know how do i run a procedure without listing of values metioned in return statement using informix online 7.3 on sco unix system.
Bulgaru Constantin wrote:
> does anyone know how do i run a procedure without listing of values
> metioned in return statement using informix online 7.3 on sco unix system.
Does this count?
CREATE PROCEDURE wrapper(arg1 VARCHAR(255) {, ...})
DEFINE rv1 VARCHAR(255); FOREACH EXECUTE PROCEDURE cursory_procedure(arg1 {, ...}) INTO rv1 {, ...}
END FOREACH;
END PROCEDURE;
Basically, it is a wrapper procedure that executes the (cursory) stored
procedure that returns the values, passing one or more arguments to the
cursory_procedure and accepting the return values (I'm not certain that I've
got the location of the INTO clause correct, and you might need a semi-colon
after the INTO clause) and discarding them. Once the cursory_procedure()
returns no more data, the wrapper returns. There are no return values from the
wrapper, so DB-Access won't list them.
The main advantage of this is that the returned data stays in the server, and
is not conveyed to the application. If you write your own ESQL/C, you can
execute the stored procedure and ignore the returned data, but it should be
slower than the wrapper because the data gets transmitted to the application.
--
Jonathan Leffler (jleffler@earthlink.net, jleffler@informix.com)
Guardian of DBD::Informix 1.00.PC1 -- see http://www.cpan.org/
#include <disclaimer.h>