title: Visual Studio Configure Data Source MySQL
body: <p>Okay well I have been accessing a mysql database in my website. I am able to connect perfectly and insert and select things from the database.</p>
  
  <pre><code>server = "localhost";
          database = "datamain";
          uid = "root";
          password = "fakepassword";
          string connectionString;
          connectionString = "SERVER=" + server + ";" + "DATABASE=" +
       database + ";" + "UID=" + uid + ";" + "PASSWORD=" + password + ";";
  
          connection = new MySqlConnection(connectionString);
  </code></pre>
  
  <p>now I am wanting to put in a listview. I then go to choose new datasource. Then I put in all my data and test connection it works, so I click okay. And now I am done so I click finish. Then it says:</p>
  
  <pre><code>The data provider "MySQL.data.MySQLClient could not be found in the system configuration. Unable to find the requested .NET framework Data provider. It may not be installed
  </code></pre>
  
  <p>And yes I have the references in bin, because it is letting me connect manually to the database</p>
  
  <p>UPDATE: I can even manually get a datasource</p>
  
  <pre><code> try
      {
          String sCon = "SERVER=localhost;DATABASE=datamain;UID=root;PASSWORD=fakepassword";
          MySqlConnection con = new MySqlConnection(sCon);
          String s = "Select * from tb_login";
          MySqlDataAdapter dat = new MySqlDataAdapter(s, con);
          DataSet ds = new DataSet();
          dat.Fill(ds, "tb_login");
          GridView1.DataSource = ds.Tables[0];
          GridView1.DataBind();
      }
  
      catch (Exception ex)
      {
          Label1.Text = ex.ToString();
      }
  </code></pre>
  
  <p>And my web.config look like this:</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;!--
    For more information on how to configure your ASP.NET application, please visit
    http://go.microsoft.com/fwlink/?LinkId=169433
    --&gt;
  &lt;configuration&gt;
    &lt;system.web&gt;
      &lt;compilation debug="true" targetFramework="4.0"&gt;
        &lt;assemblies&gt;
          &lt;add assembly="System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /&gt;
          &lt;add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /&gt;
          &lt;add assembly="System.Data.Entity.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /&gt;
        &lt;/assemblies&gt;
        &lt;buildProviders&gt;
          &lt;add extension=".edmx" type="System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider" /&gt;
        &lt;/buildProviders&gt;
      &lt;/compilation&gt;
    &lt;/system.web&gt;
  &lt;/configuration&gt;
  </code></pre>