Hello
Could someone tell me what derby requiers to make this conn?
public boolean createDatabase() throws FileNotFoundException,
IOException {
boolean createdDb = false;
Connection conn = null;
String dbURL = getDbURL();
String user = ModelUtils.getXMLResource("user");
String password = ModelUtils.getXMLResource("password");
System.out.println("in CreateDatabase:try:dbURL FROM XML
properties: " + dbURL);
System.out.println("in CreateDatabase:try:dbURL FROM XML
properties: " + user);
System.out.println("in CreateDatabase:try:dbURL FROM XML
properties: " + password);
try {
[b]conn = DriverManager.getConnection(dbURL,
dbProperties);[/b]
System.out.println("got conn?: " + conn.toString());
createdDb = createTables(conn);
System.out.println("tables created: " + createdDb);
dbProperties.put("createdDb", "true");
System.out.println("in CreateDatabase:added new
property?: " + dbProperties.getProperty("createdDb"));
} catch (SQLException ex) {
}
System.out.println("tables created: " + createdDb);
System.out.println("DataBase Created: " + createdDb);
dbProperties.remove("createdDb");
return createdDb;
}
output
run:
driver name from xml: org.apache.derby.jdbc.EmbeddedDriver
in CreateDatabase:try:dbURL FROM XML properties:
jdbc:derby:schoolofdb
in CreateDatabase:try:dbURL FROM XML properties: root
in CreateDatabase:try:dbURL FROM XML properties: ceyesuma
tables created: false
DataBase Created: false