Returning cursor in Oracle Procedure

DA Gurus,

When attempting to return a cursor dataset from an Oracle procedure call I am getting the error: FieldType ftCursor(22) is not supported.

Please advise as to how I can resolve this problem. Surely DA can return a cursor dataset?

Incidentally, this probem does NOT occur with a DBExpress driver. So, is the error a function (lack) of the UniDAC driver?

Regards,
Monte Carver

I am using
6.0.57.993 (Trial Edition)
Delphi XE2 w./Update 4
UniDAC Driver (latest)

PROCEDURE WD_GET_MY_QUESTION ( P_MEMBER_ID IN VARCHAR2,
P_LOGIN_CODE IN VARCHAR2,
P_NAME_LAST IN VARCHAR2,
P_NAME_FIRST IN VARCHAR2,
P_LANG_CODE IN VARCHAR2,
P_PROGRAM_ID IN VARCHAR2,
COUT OUT TCURSORTYPE);

Hello,
Unfortunately DA doesn’t support Cursor data types. You can use viwes for this purposes.

Views in not an option. We have fairly complicated routines, which can not be accomplished in a view. Instead we have several dozen of Oracle stored procedures, which return a dataset in the form of a cursor. After all these years I am disappointed the RO has not integrated cursors into the product, considering it is such a primary feature to Oracle.

We have put our purchase of 10 RO licenses on hold until a solution can be found. If my math is correct that is roughly $10,000. Am I to understand that the “cursor” feature is not worth investment?

Regards,
Monte Carver

Monte,

as indicated by mail already, i am sure we can find a solution. i have this looked at ASAP and will get back to you once i know more; i’m confident that we’ll be able to add the proper support for this for you, ASAP.

To clarify: does everything work as expected with the DBExpress driver, and it’s “just” that you prefer using UniDAC, or is the exact error message just specific to UniDAC, but the functionality isn’t working with either?

Monte,

could you also clarify how you access the Oracle procedures in DA (ie are they called as Schema Commands or as Schema Tables with stStoredProcedure statements)?

The question was asked (via email): "Have you tried something like?"
DIM TEMP;
CALL WD_PKG_MESSAGE.WD_GET_MESSAGE_ALL_POOL(:TEMP);
RETURN TEMP;

Being unsure of the proper syntax, “NO”. The above however does NOT work. It responds back with "No value for parameter “TEMP”.

Incidentally these procedures are in production with no issues against the dbExpress drivers in an IW app. So any issues with these stored procedures has long been flushed out…

The question was also asked re the required timeline for a fix.
Workable beta (~2weeks)
Prod stable version (~45 days)

Please advise.

Monte Carver

Hello,
Please test the following testcase which works with procedures with out parameters. It
doesn’t use schema objects (datatables, commands), but you can call stored procedures and get dataset and other out paramaters.
Here you can see the following files:

  1. Fixed UnyDAC driver. You should add uDAEFixedUniDACDriver.pas to your server project.
  2. DDL file with oracle object (tables and procedures)
  3. The full testcase. You should modify connection string and add corresponded object to database from ddl file.
    It works with any DA versions, also with trial one.
    If you have any question please contact us.

Thanks for the Demo! As you would expect I am able to make it work.

A couple questions…

  1. How would I modify the server side to consume the data server side?

  2. Any feel for an ETA on a “production” version, which is integrated into the schema, can accept input parameters, and works with any Oracle driver?

Thank you for the VERY quick response on this subject. In light of this beta and the promise to have a production version, we are proceeding with our 10 license purchase.

Regards,
Monte Carver

Monte, i’ll try to let you know how soon we can have this integrated into a production release; my gut feeling would be that this should be fine for the upcoming end-of-may “Summer 2012” release, and probably would be integrated in a beta/gamma build significantly sooner. (we lock down for Summer 2012 at the end of this month). i’ll keep you posted.

Monte, i’m told this will pretty surely go into the May release.

Did support for OUT param ref_cursor ever make it into a driver release? If so, what oracle driver and what DA release supports this? I would consider upgrading RO / DA for this feature alone. We currently use DAODACdrv.dad and but also use DOA for a C/S product and would consider this DA driver if it supported ref_cursor.

Please advise.
Thank youl

try to open such stored procedure in latest DA.
if used driver (ODAC, DOA, etc) can expand out ref_cursor into usual select, it will work