Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL access from c++ like accessing a table
"Sybrand Bakker" <gooiditweg_at_sybrandb.verwijderdit.demon.nl> schrieb im Newsbeitrag news:97l6d0l4abt11fnvap87n6dv287aakgbu7_at_4ax.com...
> it is not possible to do it in this fashion as a procedure doesn't
> return anything. You are mistaking a procedure for a function.
Yes sorry for that, and thanks for the advice.
> However the customary solution is to write a procedure
> with a REF CURSOR as OUT parameter.
> This type of procedure can be called from most front-end tools and
> report writers.
> In sql*plus you can do the following
> variable x refcursor;
> begin
> <your procedure>(:x, <your parameters>;
> end;
> print x
Generally speaking if you have a function with a ref cursor as OUT.
In C++ you define a variable as a refcursor, then call the function as
stated above and after that can access the underlying cursor directly in
c++?
I'm feeling a bit uncertain about this, maybe you do have some additional
hints for me.
Is it the right direction I am thinking of or completely wrong?
> REF CURSOR is definitely documented in Feuerstein's books and Oracle's
> PL/SQL documentation.
Yes it is. Never thought REF CURSOR is what I need.
Greetz Moritz Received on Mon Jun 21 2004 - 05:58:32 CDT