Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.1.1
-
None
-
JDK 6u37 x86 on Win7/SP1 x64 with H2 1.3.170
Description
sql.resultSetConcurrency = java.sql.ResultSet.CONCUR_UPDATABLE
followed by
sql.eachRow('select * from WINE where ID=?', [data.ID])
{ ... }results in exception from underlying H2 database when trying to change the result set within the closure.
The result set is readonly. You may need to use conn.createStatement(.., ResultSet.CONCUR_UPDATABLE). [90140-170]
Whereas this works:
sql.eachRow('select * from WINE where ID=' + data.ID) { ... }
Some tentative debugging in groovy.sql.Sql failed to reach a break point set at the place where Statements are created utilizing the Sql.resultSetConcurrency property. Suspicion is, that there is a separate bit of code for PreparedStatements where Sql.resultSetConcurrency is currently disregarded.