Main program -- all-in-one
String dbDriver = JDConstants.getProperty("jabadot.jabadb.driver");
Class.forName(dbDriver);
Connection conn = DriverManager.getConnection(
JDConstants.getProperty("jabadot.jabadb.url"));
Statement myStmt = conn.createStatement();
ResultSet rs = myStmt.executeQuery("select * from UserDB");
while (rs.next()) {
String nick = rs.getString(UserDB.NAME);
String mpw = rs.getString(UserDB.PASSWORD);
String fname= rs.getString(UserDB.FULLNAME);
String email= rs.getString(UserDB.EMAIL);
String city = rs.getString(UserDB.CITY);
String prov = rs.getString(UserDB.PROVINCE);
String cntry= rs.getString(UserDB.COUNTRY);
int privs = rs.getInt(UserDB.PRIVS);
System.out.print(nick + ":" + mpw + ":" + fname);
if (privs != 0) System.out.print(" (privs="+privs+")");
System.out.println();
}
rs.close();