title: Fill: SelectCommand.Connection property has not been initialized
body: <p>I am using the below code to access the MS Access Database. But i got a error message Fill: SelectCommand.Connection property has not been initialized.How can i solve this issue.</p>
  
  <pre><code>common.cs
  =========
  public static bool DBConnectionStatus()
          {
              try
              {
                  string conString = @"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=|DataDirectory|db_admin.mdb; Jet OLEDB:Database Password=admin";
                  using (OleDbConnection conn = new OleDbConnection(conString))
                  {
                      conn.Open();
                      return (conn.State == ConnectionState.Open);
                  }
              }
              catch (OleDbException)
              {
                  return false;
              }
  
  
  protected void btn_general_Click(object sender, EventArgs e)
          {
              try
              {
                  bool state = common.DBConnectionStatus();
                  if (state == true)
                  {
                      cmd = new OleDbCommand("select * from tbl_admin");
                      da = new OleDbDataAdapter(cmd);
                      DataSet ds = new DataSet();
  
                      da.Fill(ds); // Error Here 
                      if (ds.Tables[0].Rows.Count &gt; 0)
                      {
  
                      }
  
                  }
              }
              catch (Exception e1)
              {
              }
          }
  </code></pre>