Bring things to a state where the basic DB schema gets auto-created if it doesn't...
[cfb.git] / prod / net / jaekl / cfb / db / driver / DbDriver.java
index 169cfee3553b8cc2e247bea6914b97b40b5c5b70..9de7264d9d2ca30ebec495ca59ca8087d655d009 100644 (file)
@@ -19,13 +19,16 @@ public abstract class DbDriver {
        // Load the JDBC driver
        public abstract void load() throws ClassNotFoundException;
        
-       public abstract Connection connect(String host, int port, String user, String pass);
+       public abstract Connection connect(String host, int port, String dbName, String user, String pass) throws SQLException;
        
        public boolean createTable(Connection con, Table table) throws SQLException {
                String sql = createTableSql(table);
                try (PreparedStatement ps = con.prepareStatement(sql)) {
                        ps.executeUpdate();
                }
+               catch (SQLException exc) {
+                       throw new SQLException("Failed to executeUpdate:  " + sql, exc);
+               }
                
                return true;
        }