I have some procedure into oracle packaege that work fine.
This days I receive from DBA one procedure that OUTPUT a Ref CURSOR.
Pkg_test.procedure( listParams IN , refCursor OUT );
http://asktom.oracle.com/pls/asktom/ASK ... 3078805685
http://www.oracle-base.com/articles/mis ... rdsets.php
Some one known how I can retrieve this Oracle - Ref Cursor ?
Oracle Procedure dont work with Ref Cursor OUT
Moderators: gto, EgonHugeist, olehs
-
- Junior Boarder
- Posts: 30
- Joined: 12.08.2011, 12:42
- Location: Brazil
- Contact:
Oracle Procedure dont work with Ref Cursor OUT
Last edited by amarildolacerda on 22.04.2012, 20:08, edited 1 time in total.
-
- Junior Boarder
- Posts: 30
- Joined: 12.08.2011, 12:42
- Location: Brazil
- Contact:
I propose add stCursor at ZDbcIntfs.TZSQLType
TZSQLType = (stUnknown, stBoolean, stByte, stShort, stInteger, stLong, stFloat,
stDouble, stBigDecimal, stString, stUnicodeString, stBytes, stDate, stTime,
stTimestamp, stAsciiStream, stUnicodeStream, stBinaryStream,stCursor);
It will be possible to suport Oracle RefCursor with procedure OUTPUT or Result Functions
TZSQLType = (stUnknown, stBoolean, stByte, stShort, stInteger, stLong, stFloat,
stDouble, stBigDecimal, stString, stUnicodeString, stBytes, stDate, stTime,
stTimestamp, stAsciiStream, stUnicodeStream, stBinaryStream,stCursor);
It will be possible to suport Oracle RefCursor with procedure OUTPUT or Result Functions
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
amarildolacerda,
i wish i could say YES, lets do it. But here i'm waiting for MDeams. He's oracle developer. In my mind we still need an upgrade here concernung stCurrency, stBCD, ..., stCursor.
Which type is the Cursor from? types.cursorType
Michael
i wish i could say YES, lets do it. But here i'm waiting for MDeams. He's oracle developer. In my mind we still need an upgrade here concernung stCurrency, stBCD, ..., stCursor.
Which type is the Cursor from? types.cursorType
Michael
Best regards, Michael
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
As far as I understand there's not a real generic way you can develop to handle the data returned. You could do so when you're sure the procedure only returns one variable, which is the refcursor variable. This isn't really something you easily do with a 'one resultset at a time' architecture as zeoslib's.
I think I would write a wrapper 'Oracle Pipelined Table Function' for this procedure that takes the same input parameters as your procedure.
That way you can select from te wrapper function that in turn calls the procedure and then reads the refcursor content line by line. That way you have a select * from table(<wrapper function call>) that can be handled easily by TZQuery.
Mark
I think I would write a wrapper 'Oracle Pipelined Table Function' for this procedure that takes the same input parameters as your procedure.
That way you can select from te wrapper function that in turn calls the procedure and then reads the refcursor content line by line. That way you have a select * from table(<wrapper function call>) that can be handled easily by TZQuery.
Mark
-
- Junior Boarder
- Posts: 30
- Joined: 12.08.2011, 12:42
- Location: Brazil
- Contact:
First of all, Its so complex for me.
I try to change some piece of code to see if its possible CAST/Convert ref cursor (POCIStmt) parameters to IZStatement and/or IZDataset like TNestedDataset;
Ill attach my code... (no complete yet) (ZDbcOracleStatement line 819)
....
case CurrentVar.TypeCode of
SQLT_RSET : DefVarManager.SetAsPointer( outParamValues, CurrentVar.Data );
....
About Table Functions, its sound good.
Nowadays, I have package to isolate Oracle Code and execute some before retrieve dataset
I try to change some piece of code to see if its possible CAST/Convert ref cursor (POCIStmt) parameters to IZStatement and/or IZDataset like TNestedDataset;
Ill attach my code... (no complete yet) (ZDbcOracleStatement line 819)
....
case CurrentVar.TypeCode of
SQLT_RSET : DefVarManager.SetAsPointer( outParamValues, CurrentVar.Data );
....
About Table Functions, its sound good.
Nowadays, I have package to isolate Oracle Code and execute some before retrieve dataset
You do not have the required permissions to view the files attached to this post.