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
Cursors in Oracle Packages
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".
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".