String S2 = "Select Sum(Lamt) as LL from Loan$ where FingerPrintID='" + RCBox1.Text + "'";
cmd.CommandText = S2;
dr = cmd.ExecuteReader();
if (dr.Read())
{
decimal d = (decimal)dr["LL"];
LBL1.Visible = true;
LBL1.Text = d.ToString();
}
I am using this code to sum a column of database ..
It is working only when there is no null value in it..
object d = dr["LL"];
decimal dd = (d is DBNull) ? null : (decimal)dr["LL"];
I also try with using this to check null values but it is not working with decimal Type .
This error Shows :

..
& can i Use SQLCOMMAND LIKE "Select * from Loan$ where fingerprintid=10001"
after using this query can i get the sum of any column ?