public bool Update()
{
SqlParameter[] param = new SqlParameter[5];
param[0] = new SqlParameter("@EmpId", EmpId);
if (string.IsNullOrEmpty(Name))
{
param[1] = new SqlParameter("@Name", DBNull.Value);
}
else
{
param[1] = new SqlParameter("@Name", Name);
}
if (Salary == null)
param[2] = new SqlParameter("@Salary", DBNull.Value);
else
param[2] = new SqlParameter("@Salary", Salary);
if (DateofBirth == null)
param[3] = new SqlParameter("@DateofBirth", DBNull.Value);
else
param[3] = new SqlParameter("@DateofBirth", DateofBirth);
if (DeptId == null)
param[4] = new SqlParameter("@DeptId", DBNull.Value);
else
param[4] = new SqlParameter("@DeptId", DeptId);
return (Convert.ToInt32(SqlHelper.ExecuteNonQuery(CONNECTION_STRING, "InsertEmployee", param)) > 0);
}
Even if stored procedure executes, returning false.Why