oracle-databaseenterprise-librarydaabref-cursor

Returning ref cursor from oracle stored procedure by using DAAB from MS EntLib 4.1


Is it possible to get ref cursor from oracle stored procedure by using DAAB from Microsoft Enterprise Library 4.1?


Solution

  • Yes, surely you can.

    PROCEDURE load_all (
        p_row_start          IN     number,
        p_page_size          IN     number,
    
        cur_out              OUT    sys_refcursor
    ) AS
    ...
    

    And on the C# side:

    DbCommand cmd = db.GetStoredProcCommand("my_package.load_all", paramValues))
    IDataReader r = db.ExecuteReader(cmd);
    ...
    

    RefCursor param supposed to be named "cur_out".