# HG changeset patch # User Martin van Dinther <martin.van.dinther@monetdbsolutions.com> # Date 1642695050 -3600 # Node ID b32999570f4d97f87ada7f0460320cc053438f4b # Parent 71bcc7af90beecfdf15ddc5d246d32bd5d523924 executeUpdate(sql) and executeLargeUpdate(sql) expect a Statement, not a Query. Improved the text of the Exception msg. diff --git a/src/main/java/org/monetdb/jdbc/MonetStatement.java b/src/main/java/org/monetdb/jdbc/MonetStatement.java --- a/src/main/java/org/monetdb/jdbc/MonetStatement.java +++ b/src/main/java/org/monetdb/jdbc/MonetStatement.java @@ -457,10 +457,9 @@ public class MonetStatement } /** - * Executes the given SQL statement, which returns a single ResultSet - * object. + * Executes the given SQL query, which returns a single ResultSet object. * - * @param sql an SQL statement to be sent to the database, typically a + * @param sql an SQL query statement to be sent to the database, typically a * static SQL SELECT statement * @return a ResultSet object that contains the data produced by the given * query; never null @@ -490,7 +489,7 @@ public class MonetStatement @Override public int executeUpdate(final String sql) throws SQLException { if (execute(sql) != false) - throw new SQLException("Query produced a result set", "M1M17"); + throw new SQLException("Statement produced a result set", "M1M17"); return getUpdateCount(); } @@ -523,7 +522,7 @@ public class MonetStatement /* MonetDB has no way to disable this, so just do the normal thing ;) */ if (execute(sql) != false) - throw new SQLException("Query produced a result set", "M1M17"); + throw new SQLException("Statement produced a result set", "M1M17"); return getUpdateCount(); } @@ -678,9 +677,6 @@ public class MonetStatement * columns. If the limit is exceeded, the excess data is silently * discarded. * - * The MonetDB JDBC driver currently doesn't support limiting - * fieldsizes, and hence always return 0 (unlimited). - * * @return the current column size limit for columns storing * character and binary values; zero means there is no limit * @see #setMaxFieldSize(int max) @@ -1341,7 +1337,7 @@ public class MonetStatement @Override public long executeLargeUpdate(final String sql) throws SQLException { if (execute(sql) != false) - throw new SQLException("Query produced a result set", "M1M17"); + throw new SQLException("Statement produced a result set", "M1M17"); return getLargeUpdateCount(); } @@ -1383,7 +1379,7 @@ public class MonetStatement /* MonetDB has no way to disable this, so just do the normal thing ;) */ if (execute(sql) != false) - throw new SQLException("Query produced a result set", "M1M17"); + throw new SQLException("Statement produced a result set", "M1M17"); return getLargeUpdateCount(); }