import java.sql.Connection; import java.sql.DriverManager; //import java.util.Properties; import LocalTest.Declarations; import java.io.*; public class OpenDB { private Connection con; //private Properties Uebergabeparameter; private String parametersToConnect, DriverName; private int SepDriverName; public Connection getCon() { return con; } public OpenDB() { parametersToConnect = openConfigFile(); } public void openCon() throws Exception { SepDriverName = parametersToConnect.indexOf('|'); DriverName = parametersToConnect.substring(0, SepDriverName); parametersToConnect = parametersToConnect.substring(SepDriverName+1); //parametersToConnect = "//"+Declarations.IP_ADRESS+":"+Declarations.SEC_PORT+":"+Declarations.OPT_PORT+"/"+"Testqueries"; Class.forName(DriverName); con=DriverManager.getConnection(parametersToConnect); //con=DriverManager.getConnection("jdbc:secondo:" + parametersToConnect, "myUser", "myPassword"); } private String openConfigFile() { File configFile; final int NoLines = 6; String[] configOutput; BufferedReader f; String line; int i = 0; configOutput = new String[NoLines]; try { configFile = new File(OpenDB.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath()+"secondojdbc.cfg"); f = new BufferedReader(new FileReader(configFile)); while (i