[JDBC-91] Issue with H2 "script" command Created: 20/Feb/14 Updated: 28/Feb/14
|Reporter:||Mike Anderson||Assignee:||Sean Corfield|
While trying to execute an H2 "script" statement as follows:
(defn script 
I get the following error message:
org.h2.jdbc.JdbcSQLException: Method is not allowed for a query. Use execute or executeQuery instead of executeUpdate; SQL statement:
It's possible that I'm just doing something stupid as I don't really knwo the internals of java.jdbc, but it looks like this is a bug with the type of query being constructed in "db_do_prepared"?
|Comment by Sean Corfield [ 28/Feb/14 1:44 AM ]|
Mike, since "script to file.txt;" is not a query or update, I would expect db-do-commands to be the right function to call here, not execute! - can you try that and let me know if it works?