예제 #1
0
 public static void LogoutChiasmaDatabase()
 {
     // Disconnect the data server.
     if (IsNotNull(ChiasmaData.Database))
     {
         ChiasmaData.Database.Disconnect();
         ChiasmaData.Database = null;
     }
 }
예제 #2
0
        private static void LoginChiasmaDataBase(String connectionString)
        {
            // Set newLoginInfo to "null" for integrated security, or to a user name and password for manual login.

            // LoginChiasmaDatabase should be called within a try-catch environment
            // Try to connect to the database.
            ChiasmaData.Database = new DataServerChiasmaDB(connectionString);
            if (!ChiasmaData.Database.Connect())
            {
                throw new ConnectDatabaseException();
            }
        }