simple.data how to exec oracle package?

113 Views Asked by At

simple.data how to exec oracle package?? OracleParameter p1=new OracleParameter("mycs",OracleType.Cursor); CREATE OR REPLACE PACKAGE pkg_members AS TYPE myrctype IS REF CURSOR;

    PROCEDURE get (p_id NUMBER, p_rc OUT myrctype);
END pkg_members;

.

CREATE OR REPLACE PACKAGE BODY pkg_members

AS
    PROCEDURE get (p_id NUMBER, p_rc OUT myrctype)
    IS
       sqlstr   VARCHAR2 (500);
    BEGIN
       IF p_id = 0 THEN
          OPEN p_rc FOR
             SELECT *
               FROM members;
       ELSE
          sqlstr :=
             'select *
            from members where id=:p_id';
          OPEN p_rc FOR sqlstr USING p_id;
       END IF;
    END get;
END pkg_members; 

**And when I do that: DbContext.Open().pkg_members__get(12); error below: Simple.Data.Ado.AdoAdapterException : ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'get' ORA-06550: line 1, column 7: PL/SQL: Statement ignored**

1

There are 1 best solutions below

0
On

Simple.Data does not know about Oracle packages (nor do I, for that matter). It sounds like something that is very database specific and therefore beyond the reach of a cross-platform data access library.