2 Replies Latest reply on May 27, 2015 3:35 PM by GeorgDangl

    How to call an Stored procedured with out table



      I need to call a Stored Procedure  that have in and out parameters but I cant find where is the error:

      the store procedure

        PROCEDURE proc(pNumber       IN VARCHAR2,
                             pTable     OUT tCliente,
                             Existe        OUT BOOLEAN) IS
        CURSOR cGetCustomer(prm_nudocu IN DocCustomer.nudocu%Type) IS
          SELECT nuclie    FROM  DocCustomer WHERE cddocu = 'CI' AND nudocu = prm_nudocu
           ORDER BY nuclie;
        vnuclie Customer.nuclie%Type;
        vIndice BINARY_INTEGER := 0;
          Existe := FALSE;
          FOR k IN cGetCustomer(pNumber) LOOP
            pTable(vIndice).RNuCust := k.nuclie;
            pTable(vIndice).RName := k.name;
            vIndice := vIndice + 1;
            Existe := TRUE;
          END LOOP;
        END proc;


      my c# code is:


      OracleCommand cmd = GetCommand("pq.Proc");

                  cmd.CommandType = System.Data.CommandType.StoredProcedure;


                 OracleParameter p1= cmd.Parameters.Add("pNumber", OracleDbType.Varchar2, CI, ParameterDirection.Input);

                 OracleParameter p2= cmd.Parameters.Add("pTable", OracleDbType.RefCursor,ParameterDirection.ReturnValue);

                 OracleParameter p3= cmd.Parameters.Add("Existe", OracleDbType.Boolean,ParameterDirection.ReturnValue);



      dr = cmd.ExecuteReader();  <====  the exception  is  here


      The exception says: ORA-03115: unsupported network datatype or representation

      Any Idea ?