Thanks to the users I managed to establish the connection to my MySQL database from C #, but now another problem arose. I just want to get a DataSet where I can then read the data, but at the moment the function finishes, it always returns InvalidOperationException.
All variables are correctly initialized, and connection is the connection string. Artists is the name of one of the tables and albums is that of the other. Any extra information necessary do not hesitate to ask me.
Many thanks to those who bother to read my question, and even more to those who answer!
private void creaDataset()
{
conexion = new MySqlConnection(conexionn);
try
{
conexion.Open();
daArtists = new MySqlDataAdapter("SELECT*FROM ARTISTS", conexionn);
daArtists = new MySqlDataAdapter("SELECT*FROM ALBUMS", conexionn);
daArtists.Fill(ds, "Artists");
daAlbums.Fill(ds, "Albums");
}
finally
{
conexion.Close();
}
}