Board index » delphi » Oracle 7.3 stored procedures now return result sets!! But how??

Oracle 7.3 stored procedures now return result sets!! But how??

Hello people,

We are using Delphi 3.0 with Borland Database Engine 4.0. BDE help says that
Oracle 7.3 stored procedures can return result sets. Is there any way of to
do this by using only SP's. We don't want to return cursor from oracle
function to delphi (By using packages). Or if this is the only way to do
this, we want to know it. Any help would be appreciated. And if someone can
send a simple Oracle SP example that return result set, we will be happy.

Thanks

Bye

Alpay Alkan
Obje Bilgisayar
Istanbul/Turkey

 

Re:Oracle 7.3 stored procedures now return result sets!! But how??


Quote
On Tue, 3 Nov 1998 09:03:14 +0200, <est...@turk.net> wrote:
>We are using Delphi 3.0 with Borland Database Engine 4.0. BDE help says that
>Oracle 7.3 stored procedures can return result sets. Is there any way of to
>do this by using only SP's.

First, create a package:

CREATE PACKAGE MYPKG
IS
  TYPE CursorType IS REF CURSOR;
END MyPkg;

Then the procedure:

CREATE PROCEDURE RETURN_RESULT_SET
 (oCursor IN OUT MyPkg.CursorType) AS
BEGIN
  open oCursor for select * from SomeTable;
END;

Then in Delphi:

1. Set the TStoredProc parameter as type Cursor.
2. At this point, treat the TStoredProc component like a TQuery.
    (Use the Open method instead of ExecProc.)

-Todd

Re:Oracle 7.3 stored procedures now return result sets!! But how??


And watch for the BDE settings.
The WENDOR INIT must be set to ORA73.DLL, otherwise it will not work.

At Delphi, you must set the "oCursor" parameters to Input/Output and it's
type to cursor.

Valent Levente
ls...@szabinet.hu

Quote
Todd Barry wrote in message <363f44be.60923...@forums.borland.com>...
>On Tue, 3 Nov 1998 09:03:14 +0200, <est...@turk.net> wrote:

>>We are using Delphi 3.0 with Borland Database Engine 4.0. BDE help says
that
>>Oracle 7.3 stored procedures can return result sets. Is there any way of

to

Other Threads