public decimal GetDecimal(string columnName)
{
decimal output = 0;
try
{
int ord = (dr_Oledb != null ? dr_Oledb.GetOrdinal(columnName) : dr.GetOrdinal(columnName));
if (dr_Oledb != null)
{
if (dr_Oledb.IsDBNull(ord))
{
output = 0;
}
else
{
output = Convert.ToDecimal(dr_Oledb[ord].ToString());
}
}
else
{
if (dr.IsDBNull(ord))
{
output = 0;
}
else
{
output = Convert.ToDecimal(dr[ord].ToString());
}
}
}
catch (Exception err)
{
_lastSqlError = err;
}
return output;
}