Connect data base to a windows form aplication


hello,im using a free data base mysql. and i cant connect the server with my c# aplication, someone can give me some help?
and this is the code
string connetionString;
SqlConnection cnn;
connetionString = @“Data
;Initial Catalog=Demodb;User ID=sa;Password=demol23”;
cnn = new SqlConnection(connetionString);
MessageBox.Show(“Connection Open !”);

thankks a lot


So what exactly is the error message that you are getting? Are you able to connect to your database using one of Microsoft’s SQL Admin apps?


In the code it looks like you are trying to connect to a SQL database. Try creating the free sql database and adding the correct details.