Cursors in Oracle Packages

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Guest

Cursors in Oracle Packages

Post by Guest » Tue 31 May 2005 22:50

Is there some example or demo code for how to connect a TOraQuery (or, ultimatly a dbGrid) to a cursor contained in an Oracle package?

I've looked through the demo for cursors, but I can't make the connection on how to make it work with packages.

Thanks!

Steve

Legion
Posts: 30
Joined: Wed 01 Jun 2005 15:38
Location: Russia

Post by Legion » Wed 01 Jun 2005 15:48

create or replace package pkgTest is
type CursorType is ref cursor;
procedure prcTest(
po_TabCursor out CursorType
);
end pkgTest;

create or replace package body pkgTest is
procedure prcTest(
po_TabCursor out CursorType
)
as
begin
open po_TabCursor for
select *
from ttt;
end prcTest;
end pkgTest;

OraQuery.SQL:
begin
pkgTest.prcTest
(
:TabCursor
);
end;
Set type of parameter "TabCursor" to "Cursor".

Post Reply