Example #1
0
 public static void OpenConn()
 {
     connection.Close();
     try
     {
         connection.ConnectionString = SqlConn.GetConnectionString();
         connection.Open();
     }
     catch (Exception e)
     {
         MessageBox.Show("The sysyem failed to establish a connection." + Environment.NewLine + e);
     }
     //finally
     //{
     //    ConnectionState();
     //}
 }