0

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....

3
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by Mitja Bonca
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.