1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

How to return data structure from stored procedure

Discussion in 'SQL PL/SQL' started by rodnower, Jun 13, 2010.

  1. rodnower

    rodnower Active Member

    Likes Received:
    Trophy Points:
    Hello, I have C# application that retrieve data from AQ with some oracle stored procedure, that stored in package. The scheme is:
    C# code -> Stored Procedure in Package -> AQ

    Inside of this stored procedure I use DBMS_AQ for dequeue the data to some object of some type.
    Now I have this object. My question is how I return it?
    Previously I:

    1. Created some virtual table,
    2. Make EXTEND() to table
    3. Inserted the data from object to table,
    4. Perform select on the table,
    5. And return sys_refcursor.

    In side of C# I filled DataSet with help of OracleDataAdapter.Fill()

    After that I upgraded it to return data fields during OUT parameters.
    But now I have much fields, and I may not to create so much OUT parameters...

    What the best way to do this?
    Thank you for ahead.