1.1 --- a/java/sql-dk/src/info/globalcode/sql/dk/DatabaseConnection.java Sun Dec 22 23:31:55 2013 +0100
1.2 +++ b/java/sql-dk/src/info/globalcode/sql/dk/DatabaseConnection.java Sun Dec 22 23:55:07 2013 +0100
1.3 @@ -76,8 +76,22 @@
1.4 formatter.writeParameters(sqlCommand.getParameters());
1.5 try (PreparedStatement ps = sqlCommand.prepareStatement(connection)) {
1.6 sqlCommand.parametrize(ps);
1.7 - try (ResultSet rs = ps.executeQuery()) {
1.8 - processResultSet(rs, formatter);
1.9 +
1.10 + boolean isRS = ps.execute();
1.11 + if (isRS) {
1.12 + try (ResultSet rs = ps.getResultSet()) {
1.13 + processResultSet(rs, formatter);
1.14 + }
1.15 + } else {
1.16 + /**
1.17 + * TODO: process UPDATE command
1.18 + */
1.19 + }
1.20 +
1.21 + while (ps.getMoreResults() || ps.getUpdateCount() > -1) {
1.22 + /**
1.23 + * TODO: process more RS or UPDATEs
1.24 + */
1.25 }
1.26 }
1.27