Re: Stored Procedures
Posted in 1999
> I have two questions:
>
> 1) How can I unload the results of a stored procedure within the
>dbaccess? I tried
> unload to "xx"
> execute procedure my_proc()
> and
> execute procedure my_proc()
> into temp yy
> But it did not worked!
Create temp table in procedure, save results into table and after executingprocedure unload temp table...
>
> 2) How can I call a stored procedure within a 4gl program? I tried t
>call it like functions but it is of no use.
>
LET SQLStr = "EXECUTE PROCEDURE my_proc( '", ProcParam, "' )"
PREPARE st_ExecProc FROM SQLStr
DECLARE c_ExecProc CURSOR FOR st_ExecProc
OPEN c_ExecProc
FETCH c_ExecProc INTO RetParam, ...
CLOSE c_ExecProc
FREE c_ExecProc
FREE st_ExecProc
Best regards,
Danail Danailov