MySqlConnectionStringBuilder conn_string = new MySqlConnectionStringBuilder(); conn_string.Server = "mysql8.000webhost.com"; conn_string.UserID = "a1613857_***"; conn_string.Password = "*****"; conn_string.Database = "a1613857_****"; //SqlConnection conn = new SqlConnection(conn_string.ConnectionString); using (MySqlConnection conn = new MySqlConnection(conn_string.ToString())) using (MySqlCommand cmd = conn.CreateCommand()) { try { conn.Open(); MessageBox.Show("DB is Open"); } catch(Exception ex) { MessageBox.Show("No Connection to DB"); MessageBox.Show(ex.Message); } finally { conn.Close(); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)