diff --git a/src/main/java/neqsim/util/database/NeqSimDataBase.java b/src/main/java/neqsim/util/database/NeqSimDataBase.java index 224ea37402..359699b00e 100644 --- a/src/main/java/neqsim/util/database/NeqSimDataBase.java +++ b/src/main/java/neqsim/util/database/NeqSimDataBase.java @@ -55,11 +55,7 @@ public class NeqSimDataBase *

*/ public NeqSimDataBase() { - // Fill tables from csv-files if not initialized and not currently being - // initialized. - if (dataBaseType == "H2fromCSV" && !h2IsInitialized && !h2IsInitalizing) { - initH2DatabaseFromCSVfiles(); - } + setDataBaseType(dataBaseType); try { @@ -296,6 +292,12 @@ public static void setDataBaseType(String aDataBaseType) { public static void setDataBaseType(String aDataBaseType, String connectionString) { dataBaseType = aDataBaseType; + // Fill tables from csv-files if not initialized and not currently being + // initialized. + if (dataBaseType == "H2fromCSV" && !h2IsInitialized && !h2IsInitalizing) { + initH2DatabaseFromCSVfiles(); + } + if (connectionString != null) { NeqSimDataBase.connectionString = connectionString; }