You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to get all the schemas that I have in my H2 DB in I get this error: Error: Error running instance method org.h2.jdbc.JdbcSQLException: Method is not allowed for a query. Use execute or executeQuery instead of executeUpdate; SQL statement: show schemas [90001-197]
I've noticed that the error is in the function execute in the line 421 of the index.js of H2
the problem occurs because you have an If asking if the query doesn't starts with select your run this code: executeQuery = statement.executeUpdate;
but in this case my query doesn't starts with select but is not a sql statements that insert/update/delete, so that cause the error.
again thank you very much for this adapter,
The text was updated successfully, but these errors were encountered:
This trick (which validates a SELECT expression) is running because native adapter separates the execution of SELECT or INSERT, UPDATE, DELETE statements (as you described above).
So, I think is better to use raw connection for this statement only ("SHOW SCHEMAS").
e.g.
I was trying to get all the schemas that I have in my H2 DB in I get this error:
Error: Error running instance method org.h2.jdbc.JdbcSQLException: Method is not allowed for a query. Use execute or executeQuery instead of executeUpdate; SQL statement: show schemas [90001-197]
I've noticed that the error is in the function execute in the line 421 of the index.js of H2
the problem occurs because you have an If asking if the query doesn't starts with select your run this code:
executeQuery = statement.executeUpdate;
but in this case my query doesn't starts with select but is not a sql statements that insert/update/delete, so that cause the error.
again thank you very much for this adapter,
The text was updated successfully, but these errors were encountered: