Shahbaz Kaware

Shahbaz Kaware

  • 1.6k
  • 317
  • 12.4k

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;
}
}

Brought to you by: JavaScript SDK for Bold BI dashboard and analytics embedding. Free trial.

Answers (3)