title: count records from sql table and display it on textbox
body: <p>I knew this is simple but I am not able to think. Displaying the count of a record from table and display it on textbox. </p>
  
  <pre><code>private void gMapControl1_Load_1(object sender, EventArgs e)
  {
      SqlConnection conDatabase = new SqlConnection(constring);
      conDatabase.Open();
      DataTable db = new DataTable();
      SqlDataAdapter sda = new SqlDataAdapter(
          "select count(site) from [ICPS].[dbo].[excel GPS postcode]",
          conDatabase);
  
      sda.Fill(db);
      textBox29.Text = ;
  
      SqlDataAdapter sda = new SqlDataAdapter(
          "select count(site) from [ICPS].[dbo].[excel GPS postcode] "
              + "where Region = '1'",
          conDatabase);
  
      sda.Fill(db);
      textBox30.Text = ;
  }
  </code></pre>