Re: Returning resultset from stored procedure

From: Roger Snowden <snowden_at_NOT.com>
Date: 1998/12/19
Message-ID: <367BF264.F594253B_at_NOT.com>#1/1


Salaam-

Oracle 7.3 supports a cursor datatype, which can be returned via a function. You select the cursor reference variable as a parameter in a "select func(cursor_thing) from dual" type of statement. For specific syntax, please check out technet.oracle.com. It's free to join and has all sorts of code samples you can use.

Roger

Roger Snowden
Sr. Systems Engineering Specialist
Oracle Corporation
rsnowden_at_NOTus.oracle.com <-- to reply, remove the obvious

yitbsal_at_statcan.ca wrote:
>
> Hi,
>
> I would like to be able to create a stored procedure that does one 'select'
> statement and returns the resultset via an OUT parameter to the calling
> function (say, a VB or Delphi) program. I would like the VB or Delphi client
> to receive the data in a resultset, in the same way that it would by running
> the SQL query itself. Is this possible?
>
> From what I understand, I can't use the table datatype, because it can only
> contain one column. Of course, I can use several tables, but then it would
> be messy for the client software.
>
> Why do I want to do this? Essentially, I would like the client to be able to
> call stored procedures to return data instead of bothering with the SQL
> itself. These stored procedures would consist of small bits of code and an
> SQL query.
>
> Thanks,
> Salaam Yitbarek
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Received on Sat Dec 19 1998 - 00:00:00 CET

Original text of this message