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.
Octav Chiriac — — source: Informix-list mailing list archive (1991-1998)
Pavel Berzin wrote:
>Hi, all!
>Please help.
>How to run stored procedure from 4gl code?
>
>I did so:
>1. stored procedure returns one value
>2. 4gl code is like this
> DEFINE ii integer
> EXECUTE PROCEDURE aaa() INTO ii>
>Doesn't work.
>
>"You must declare cursor procedure before ... bla-bla-bla"
Sure you have to declare a cursor on stored procedure. More than this
you should prepare the execute procedure statement (at least this
is required in my version of 4GL). So your code should look like:
DEFINE ii integer
PREPARE stmt FROM "EXECUTE PROCEDURE aaa()"
DECLARE crsr FOR stmt
OPEN crsr
FETCH crsr INTO ii
CLOSE crsr
... all that stuff with freeing the cursor/statement
Hope it helps,
Octav
>
>Thank you,
>Berzin Pavel
>
>
--
Octav Chiriac Phone: (373) 2 21 20 96
NetInfo S.R.L. Fax: (373) 2 21 36 59
Chisinau (373) 2 24 00 83
Moldova, Republic of mailto:com@netinfo-moldova.com
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.