title: Connecting to a MySQL database with C# express via ODBC
body: <p>I need to connect to a MySQL database via C# express 2008. I think I got the code right apart from the connection string. I obtained this code from a forum but the connection string was for SQLExpress 2005. Can someone please help me on how can I fix this? Here is the code with the SQL Express connection string:</p>
  
  <pre><code>//string connectionString = "Driver={SQL Native Client}; Server=localhost\\sqlexpress;" + "Database=oshahsdb;Trusted_Connection=yes;";
  
  using (OdbcConnection odbcCon = new OdbcConnection(connectionString))
  using (OdbcCommand odbcCom = new OdbcCommand("Select * FROM Product", odbcCon))
  using (OdbcDataAdapter odbcDA = new OdbcDataAdapter(odbcCom))
  using (DataSet ds = new DataSet())
  {
     odbcCon.Open();
     odbcDA.Fill(ds);
  
     this.dataGridView1.DataSource = ds.Tables[0];
  }
  </code></pre>
  
  <p>I also need to add a username and password to the connection string.</p>