"ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'VIEW_EMPLOYEE_DETAILS'
"
this is asp.net
public void DisplayRecord()
{
OracleConnection connR = new OracleConnection(ConfigurationManager.ConnectionStrings["ssat"].ToString());
OracleCommand cmd1 = new OracleCommand("view_employee_details", connR);
connR.Open();
try
{
cmd1.CommandType = System.Data.CommandType.StoredProcedure;
cmd1.Parameters.Add(new OracleParameter("i_employeeid", OracleType.Number)).Value = Convert.ToInt32(EmployeeIdText.Text.ToString());
cmd1.Parameters.Add(new OracleParameter("o_cursor", OracleType.Cursor)).Direction = ParameterDirection.Output;
OracleDataAdapter da = new OracleDataAdapter(cmd1);
da.SelectCommand = cmd1;
DataSet ds = new DataSet();
da.Fill(ds);
EmployeeDetailsGrid.DataSource = ds.Tables[0]; ;
EmployeeDetailsGrid.DataBind();
EmployeeDetailsGrid.Visible = true;
}
catch (Exception e)
{
errorlbl.Visible = true;
}
}
my procedure
PROCEDURE view_employee_details(
i_employee_id IN number,
o_cursor OUT sys_refcursor)
is
begin
open o_cursor
for
select * from employee_details e
where e.employee_id=i_employee_id;
end;