title: fill datagridview with content from .mdf
body: <p>I am trying to fill a datagridview with content from  a <code>.mdf</code> SQL Server database file (C# Windows Forms app)...</p>
  
  <pre><code>private void Companies_Load(object sender, EventArgs e)
  {
     load_table();
  }
  
  void load_table()
  {
              String DATA = Application.StartupPath + @"\data.mdf";
              string constring = @"Data Source=(LocalDB)\v11.0;AttachDbFilename=" + DATA + ";Integrated Security=True";
  
              MySqlConnection conDataBase = new MySqlConnection(constring);
              MySqlCommand cmdDataBase = new MySqlCommand("select * from Companies ;", conDataBase);
              try
              {
                  MySqlDataAdapter sda = new MySqlDataAdapter();
                  sda.SelectCommand = cmdDataBase;
                  DataTable dbdataset = new DataTable();
                  sda.Fill(dbdataset);
                  BindingSource bSource = new BindingSource();
  
                  bSource.DataSource = dbdataset;
                  dataGridView1.DataSource = bSource;
                  sda.Update(dbdataset);
              }
              catch (Exception uu)
              {
                  MessageBox.Show(uu.Message);
              }
          }
  </code></pre>
  
  <p>I get nothing. DataGridView is empty. No errors...</p>
  
  <p>Table name: <code>Companies</code> with 4 rows and 1 column...</p>
  
  <p>I tried SQL statements like</p>
  
  <pre><code>select * from dbo.Companies ;
  </code></pre>
  
  <p>... still nothing</p>
  
  <p>I changed <code>data.mdf</code> connection to full path c:/etc/etc ...</p>
  
  <p>No luck.</p>
  
  <p>Any simple solution is welcome :)</p>