ORA-06550 RRS feed

  • Question

  • User-1868533221 posted
    Hi, I am trying to execute a pl/sql function. And I am having the following error. ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'NR_INSTITUTIONS' ORA-06550: line 1, column 7: PL/SQL: Statement ignored The code in .NET is: ************************************************************ OracleConnection conn=new OracleConnection ("Data Source= orcl1; User Id=dap; Password=dap;"); OracleCommand cmd=new OracleCommand(); cmd.Connection=conn; cmd.CommandText="institution.nr_institutions"; cmd.CommandType=CommandType.StoredProcedure; cmd.Parameters.Add("instid", OracleType.Number,16).Value=1; cmd.Parameters.Add("num",OracleType.Number).Direction=ParameterDirection.Output; conn.Open(); cmd.ExecuteNonQuery(); td1.InnerText=cmd.Parameters["num"].Value.ToString(); conn.Close(); ************************************************ And the pl/sql Stored Procedure is (The Function is inside the package Instituion. The type of instid is number) ************************************************ function nr_institutions (instid institutions.inst_id%type) return number is num number; begin select count(*) into num from institutions where ins_inst_id=instid; return num; end nr_institutions; Can anyone tell me why this is happening?? Thanks a lot Arilde
    Tuesday, October 26, 2004 8:40 AM

All replies

  • User1392434580 posted
    Arilde, Try this command in oracle: desc institutions; that will tell you all of the columns in that table or view and what their datatypes are. From there match the Datatype of the column to the Parameter in .NET, At first glance i'd suspect you've got the size incorrect, but that's just a guess. Hth, Scott
    Wednesday, October 27, 2004 12:45 PM
  • User-1362986357 posted
    I had the same errror message when I added a new field to a view. The solution was to first DROP the existing view and recreate the view with my new field. That corrected my problem. Worth a try if you're still having problems. Geno
    Thursday, October 28, 2004 8:16 PM