Re: call procedure from 4gl
Posted in 2000
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL
From: Jonathan Stowe <jonathan.stowe@dircon.net> > >On Tue, 18 Apr 2000, Obnoxio The Clown wrote: > > > From: "OOO" <O.Kotov@vaz.ru> > > > > > >How can i call stored procedure from 4gl program. > > > > LET str = "EXECUTE PROCEDURE x()" > > PREPARE xstr FROM str > > > > EXECUTE xstr > >What 'noxio said except if your stored procedure returns anything then you >must declare a cursor : > >DECLARE xstr_cursor CURSOR FOR xstr > >OPEN xstr_cursor >FETCH xstr_cursor INTO tmp_xstr >CLOSE xstr_cursor > >You might want to use FOREACH if your procedure can return more than one >row. <Tchoh!> I want him to RTFM at some point, you know... ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com
Obnoxio The Clown wrote: > From: Jonathan Stowe <jonathan.stowe@dircon.net> > >On Tue, 18 Apr 2000, Obnoxio The Clown wrote: > > > From: "OOO" <O.Kotov@vaz.ru> > > > >How can i call stored procedure from 4gl program. > > > > > > LET str = "EXECUTE PROCEDURE x()" > > > PREPARE xstr FROM str > > > EXECUTE xstr > > > >What 'noxio said except if your stored procedure returns anything then you > >must declare a cursor : > > > >DECLARE xstr_cursor CURSOR FOR xstr > > > >OPEN xstr_cursor > >FETCH xstr_cursor INTO tmp_xstr > >CLOSE xstr_cursor > > > >You might want to use FOREACH if your procedure can return more than one > >row. > > <Tchoh!> I want him to RTFM at some point, you know... Good, 'cos then he'll talk about SQL blocks and so on, which provide alternatives, but only I4GL 7.30 or D4GL 3.00 or later. Or maybe you will, instead... -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v1.00.PC1 -- see http://www.perl.com/CPAN #include <disclaimer.h>