I am wondering what everyone thinks the best method of handling results from your own database is. Other teams may be involved and there is always the chance the procedure/data could be altered and erroneous results would occur. My question is this. Is it better to let and exception occur, catch and log it or try to handle all contingencies and hide the error? Say, something like below.
if (dr.Table.Columns.Contains("column") && !dr["column"].Equals(DBNull.Value))
{
this.value = (type)dr["column"];
}
else
{
this.value= null;
}