none
Execute Oracle SP RRS feed

  • Question

  • Hi Experts,

       I am trying to execute oracle SP using oracle client. Basically i dont want to create parameter object. I want send parameter values in command text property as below but it's not executing. Something wrong in command text. I guess we need send parameter values in some other way in command text.

    Please help me.

                    objConn.Open();
                    OracleCommand cmd = new OracleCommand();
                    cmd.Connection = objConn; 
                    cmd.CommandText = "call VGI_DB_ITEM_PROC2 (020001,'381563078','01','2011-04-08 00:00:00.000','01')"; 
                    cmd.CommandType = CommandType.StoredProcedure ; 

                   OracleDataAdapter ada = new OracleDataAdapter(cmd);
                    DataSet ds = new DataSet();
                    ada.Fill(ds);

    Below is SP parameter declaration.

    PlanNo        IN  NUMBER,
    Participant   IN  VARCHAR2,
    SequenceNo    IN  VARCHAR2,
    PaymentDte    IN  VARCHAR2,
    AccountNo     IN  VARCHAR2,
    P_recordset   OUT SYS_REFCURSOR

    Wednesday, April 20, 2011 12:18 AM

Answers

All replies