Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Getting result set from stored proc...
Hi Sergey,
You need to use a REF CURSOR and have that as in out parameter to your
procedure.
Thomas Kyte has posted several examples recently.
Hth,
--
Sybrand Bakker, Oracle DBA
<sergey_s_at_my-deja.com> wrote in message news:7qi4ie$ng5$1_at_nnrp1.deja.com...
> In Sybase or SQL Server I can have a straight SELECT statement within a
> stored procedure. For example:
>
> create procedure sp_test as
> select * from xyz;
>
> When I call sp_test from outside (VB, C++, or whatever), I get the whole
> result set back and I can cycle through it using methods found in C++ or
> VB (I am using ODBC).
>
> Oracle requires a SELECT INTO, however (or I could use a cursor). But
> how would I return the entire result set back to my VB or C++ program?
> Do I have to use OCI for that or is there some other way?
>
> Thank you.
> Sergey
>
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
Received on Tue Aug 31 1999 - 23:55:36 CDT