Browse Source

Make sure the JDBC driver knows how to handle the URL.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268041 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 25 years ago
parent
commit
79903e422d
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      src/main/org/apache/tools/ant/taskdefs/SQLExec.java

+ 5
- 0
src/main/org/apache/tools/ant/taskdefs/SQLExec.java View File

@@ -289,6 +289,11 @@ public class SQLExec extends Task {
info.put("password", password);
conn = driverInstance.connect(url, info);

if (conn == null) {
// Driver doesn't understand the URL
throw new SQLException("No suitable Driver for "+url);
}

conn.setAutoCommit(autocommit);

statement = conn.createStatement();


Loading…
Cancel
Save