currentDatabase.open(iUserName, iUserPassword);
currentDatabaseName = currentDatabase.getName();
if (currentDatabase.getStorage() instanceof OStorageRemote)
serverAdmin = new OServerAdmin((OStorageRemote) currentDatabase.getStorage());
} else {
// CONNECT TO REMOTE SERVER
out.print("Connecting to remote Server instance [" + iURL + "] with user '" + iUserName + "'...");
serverAdmin = new OServerAdmin(iURL).connect(iUserName, iUserPassword);
}
out.println("OK");
}