I added the reference for the MySQL server in C#. I thought I have this code right. I know the connection values are right for testing. Here is my error:
{\"A network
You can do:
using(SqlConnection connection = new MySqlConnection(connectionString)) { try { conn.Open(); } catch(SqlException ex) { switch(ex.Number) { case 18456: // Can't login // Do something break; default: break; } } }
To get the complete list of codes run:
SELECT * FROM master.dbo.sysmessages