Shahbaz Kaware

Shahbaz Kaware

  • NA
  • 535
  • 31.8k

How to get the data in return is null now

Nov 4 2019 2:21 AM
public Employee GetEmployeewithID(int sEQ_EMP_ID)
{
int i;
Employee objEmp;
objEmp = new Employee();
try
{
objOracleCommand = new OracleCommand();
objOracleCommand.Connection = new OracleConnection(cs);
objOracleCommand.Connection.Open();
objOracleCommand.CommandType = CommandType.StoredProcedure;
objOracleCommand.CommandText = "PKG_EMPLOYEE.Get_Employee_with_ID";
objOracleCommand.Parameters.AddWithValue("P_SEQ_EMP_ID", sEQ_EMP_ID);
objOracleCommand.Parameters.Add("OUT_RESULT", OracleType.Cursor).Direction = ParameterDirection.Output;
objOracleDataAdapter = new OracleDataAdapter(objOracleCommand);
i = objOracleCommand.ExecuteNonQuery();
return objEmp;
}
catch (Exception ex)
{
throw ex;
}
}

Answers (3)