locked
Am getting this error in orcle 11g ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'POPULATE_GENERAL_BOND_DATA' ORA-06550: line 1, column 7: PL/SQL: Statement ignored RRS feed

  • Question

  • User-1755706901 posted

    Here   p_ebond_id is output parameter and its datatype is number below code am using but getting error.Please tell where am going wrong. 

                 OracleParameter pebondidout = new OracleParameter();
                    pebondidout.ParameterName = "p_ebond_id";
                    pebondidout.Direction = ParameterDirection.Output;
                    pebondidout.Size = 1;
                    pebondidout.ArrayBindSize = new int[1] { 100 };
                    pebondidout.OracleDbTypeEx = OracleDbType.Varchar2;
                    pebondidout.CollectionType = OracleCollectionType.PLSQLAssociativeArray;
                    Orcmd1.Parameters.Add(pebondidout);
                    
                    Orcmd1.Connection = Oracon;
                    Oracon.Open();
                    int k = Orcmd1.ExecuteNonQuery();

                    Resultset = (string[])Orcmd1.Parameters["p_ebond_id"].Value;

    Thanks in Advance

    Friday, September 12, 2014 5:09 AM

All replies

  • User269602965 posted

    Show your PLSQL procedure

    Friday, September 12, 2014 9:32 PM
  • User-271186128 posted

    Hi mdr.devender,

    As for this issue, you could refer to the following code.

    OracleConnection conn = new OracleConnection("Data Source=oracledb;
        User Id=UserID;Password=Password;");
    
    OracleCommand cmd = new OracleCommand();
    cmd.Connection = conn;
    cmd.CommandText = "COUNT_JOB_HISTORY";
    cmd.CommandType = CommandType.StoredProcedure;
    cmd.Parameters.Add("reccount", OracleType.Number).Direction =
        ParameterDirection.Output;
    
    conn.Open();
    cmd.ExecuteNonQuery();
    conn.Close();
    
    Console.WriteLine(cmd.Parameters["reccount"].Value);

    For more details, please refer to this article.

    Accessing Oracle 9i Stored Procedures Using ADO.NET: https://msdn.microsoft.com/en-us/library/ms971506.aspx

    Best Regards, Dillion

    Thursday, January 22, 2015 6:38 AM