Details
-
Bug
-
Resolution: Won't Fix
-
Major
-
5.0.0
-
None
-
Untriaged
-
Unknown
Description
In the code if we create a prepare statement once and reuse it, it does not work . It throws following error
Exception in thread "main" java.sql.SQLException: [Simba][CouchbaseJDBCDriver](500210) Execute update fail, executeupdate fail. Code: 3000, message syntax error - at INTO
at com.simba.couchbase.utils.CBQueryUtils.buildServerErrorMessage(CBQueryUtils.java:114)
at com.simba.couchbase.core.CBClient.executeUpdate(CBClient.java:317)
at com.simba.couchbase.dataengine.resultset.CBWriteResultSet.execute(CBWriteResultSet.java:1332)
at com.simba.couchbase.dataengine.resultset.CBWriteResultSet.onFinishDMLBatch(CBWriteResultSet.java:675)
at com.simba.sqlengine.executor.etree.relation.ETTable.onFinishDMLBatch(Unknown Source)
at com.simba.sqlengine.executor.etree.statement.ETInsert.endBatch(Unknown Source)
at com.simba.sqlengine.executor.StatementExecutor.endBatch(Unknown Source)
at com.simba.sqlengine.dsiext.dataengine.SqlQueryExecutor.execute(Unknown Source)
at com.simba.jdbc.common.SPreparedStatement.executeWithParams(Unknown Source)
at com.simba.jdbc.common.SPreparedStatement.executeUpdate(Unknown Source)
Caused by: com.simba.support.exceptions.GeneralException: [Simba][CouchbaseJDBCDriver](500210) Execute update fail, executeupdate fail. Code: 3000, message syntax error - at INTO
If we change it with following it works
for(int j =1; j <=11 ; j++) {
preparedStatement = con.prepareStatement(selectSQL); >> Creating prepare statement every time
preparedStatement.setString(1, "p11190"+ String.valueOf(j));