Package com.mckoi.database

Examples of com.mckoi.database.Database


    // This will throw an Error exception if the database system has already
    // been initialized.
    system.init(config);
    // Note, currently we only register one database, and it is named
    //   'DefaultDatabase'.
    Database database = new Database(system, "DefaultDatabase");
    boolean success = false;
    try {
      // Convert to the current version.
      success = database.convertToCurrent(System.out, stringUser);
    } catch (IOException e) {
      System.out.println("IO Error: " + e.getMessage());
      e.printStackTrace(System.out);
    }

    if (success) {
      System.out.println("-- Convert Successful --");
    } else {
      if (stringDriver.compareTo(DataConnection.MCKOI_DRIVER) != 0 &&
          stringUser.compareTo("PasswordIsPass") != 0) {
        //they are using another database, try again.
        try {
          // Convert to the current version.
          success = database.convertToCurrent(System.out, "PasswordIsPass");
        } catch (IOException e) {
          System.out.println("IO Error: " + e.getMessage());
          e.printStackTrace(System.out);
        }
      }
View Full Code Here

TOP

Related Classes of com.mckoi.database.Database

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.