Part of the void code:
string sql = "SELECT SUM(monto) As TOTALM from meses where status='ACTIVO' and mesactual= '" + vMes.ToString() + "' and ano= '" + vAno.ToString() + "'";
dtm = new OleDbDataAdapter("Select * from meses order by nombre", con);
oCM = new OleDbCommandBuilder(dtm);
OleDbCommand cmd = new OleDbCommand(sql, con);
OleDbDataReader reader = cmd.ExecuteReader();
dtm.Fill(tm);
while (reader.Read())
{
if ([B]HOW I CAN KNOW IF THIS VALUE IS NULL????[/B])
{
txtPendiente.Text = "No hay registros disponibles";
return;
}
else
{
string xTotal = reader["TOTALM"].ToString();
int vTotal = int.Parse(xTotal);
txtPendiente.Text = string.Format("{0:$0.00}", vTotal);
}
}
reader.Close();
cmd.Dispose();
thx for your help....