1.1 --- a/java/sql-dk/src/info/globalcode/sql/dk/DatabaseConnection.java Sat Dec 21 22:18:07 2013 +0100
1.2 +++ b/java/sql-dk/src/info/globalcode/sql/dk/DatabaseConnection.java Sat Dec 21 22:22:30 2013 +0100
1.3 @@ -18,6 +18,9 @@
1.4 package info.globalcode.sql.dk;
1.5
1.6 import info.globalcode.sql.dk.configuration.DatabaseDefinition;
1.7 +import java.sql.Connection;
1.8 +import java.sql.DriverManager;
1.9 +import java.sql.SQLException;
1.10
1.11 /**
1.12 *
1.13 @@ -26,8 +29,11 @@
1.14 public class DatabaseConnection {
1.15
1.16 private DatabaseDefinition databaseDefinition;
1.17 + private Connection connection;
1.18
1.19 - public DatabaseConnection(DatabaseDefinition databaseDefinition) {
1.20 + public DatabaseConnection(DatabaseDefinition databaseDefinition) throws SQLException {
1.21 this.databaseDefinition = databaseDefinition;
1.22 +
1.23 + connection = DriverManager.getConnection(databaseDefinition.getUrl(), databaseDefinition.getName(), databaseDefinition.getPassword());
1.24 }
1.25 }