Connection Examples

Method A
String driver = "com.northgateis.reality.realsql.RealSQLDriver";
String url = "jdbc:realsql://magpie:1203/TESTDBASE;" +
  "user=ajt,password=a23Fgh,account=SQL-TEST,accountpwd="
// Connect to the database
try {
   Class.forName(driver);
   connection = DriverManager.getConnection(url);
}
catch( SQLException e ) {
   System.out.println("Failed to connect: " + e.getMessage());
   return;
}
catch( ClassNotFoundException e ) {
   System.out.println("Unable to find driver class.");
   return;
}
System.out.println("Connected to the database.");
Method B
String driver = "com.northgateis.reality.realsql.RealSQLDriver";
String url = "jdbc:realsql://magpie:1203/TESTDBASE";
String user="ajt";
String userpwd="a23Fgh";
String account="SQL-TEST";
String accountpwd="";
Properties info = new Properties();
info.put("user", user);
info.put("password", userpwd);
info.put("account", account);
info.put("accountpwd", accountpwd);
info.put("logLevel", "INFO");
info.put("logOptions", "METHODS");
info.put("logModules", "CONNECTION|DATABASEMETADATA");
PrintWriter pw = new PrintWriter(System.out);
DriverManager.setLogWriter(pw);
// Connect to the database
try {
   Class.forName(driver);
   connection = DriverManager.getConnection(url, info);
}
catch( SQLException e ) {
   System.out.println("Failed to connect: " + e.getMessage());
   return;
}
catch( ClassNotFoundException e ) {
   System.out.println("Unable to find driver class.");
   return;
}
System.out.println("Connected to the database.");
Method C
String driver = "com.northgateis.reality.realsql.RealSQLDriver";
String url = "jdbc:realsql://magpie:1203/TESTDBASE;" +
   "account=SQL-TEST,accountpwd=,logModules=DDA"
String user="ajt";
String password="a23Fgh";
PrintWriter pw = new PrintWriter(System.out);
DriverManager.setLogWriter(pw);
// Connect to the database
try {
   Class.forName(driver);
   connection = DriverManager.getConnection(url, user, password);
}
catch( SQLException e ) {
   System.out.println("Failed to connect: " + e.getMessage());
   return;
}
catch( ClassNotFoundException e ) {
   System.out.println("Unable to find driver class.");
   return;
}
System.out.println("Connected to the database.");