title: How to count total number of rows of an access database table?
body: <pre><code>string constr = @"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\Users\yogi\Documents\mydb.mdb";
  string cmdstr = "select * from quant_level1";
  OleDbConnection con = new OleDbConnection(constr);
  OleDbCommand com = new OleDbCommand(cmdstr, con);
  con.Open();
  OleDbDataReader reader = com.ExecuteReader();
  reader.Read();
  DataSet data = new DataSet();
  int i = data.Tables["quant_level1"].Rows.Count;
  Label2.Text = i.ToString();
  </code></pre>