Iain,
Unfortunatly you cannot visually connect to MySQL through C# Express, i dont
know why, i think this is just one of the limitations of C# Express.
However, you can use ODBC to connect to MySQL through code, so long as you
know the ODBC Connection string to use. Please have a look at the following
code snippet.
using System.Data.Odbc;
using System.Data;
private void GetDataFromMySQL()
{
string connStr = "";
// i am not sure what the connection string for MySql would be, i think it
might "Provider=MySQLProv;Data Source=mydb;User
Id=UserName;Password=asdasd;"
using (OdbcConnection odbcCon = new OdbcConnection(connStr))
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);
/** Now that we have it in a DataSet, we can do what you want with it: f
your controls...
**/
this.dataGridView1.DataSource = ds.Tables[0];
}
}
Hope this helps
Regards
Scott Blood
C# Developer
"Iain" <te**@test.co.uk> wrote in message
news:eF****************@TK2MSFTNGP09.phx.gbl...
Hi
Is it possible to get Visual Studio C# Express (beta 2) connecting to a
MySQL database?
TIA
Iain