The captureStatementBatchSQL property applies only when the value of captureMode is ON.
This property can take these values:
Therefore, set captureStatementBatchSQL to OFF only if allowDynamicSQL will be TRUE when you run the application with executionMode equal to STATIC. In this situation, each Statement.addBatch() call will execute dynamically, with no check to see if the SQL statement is in the pureQueryXML file.
When you capture statements, set captureStatementBatchSQL to ON. This setting causes pureQuery to save in a pureQueryXML file all statements that are processed by the Statement.addBatch() method, up to the limit set by maxNonParmSQL.
When you run your application after binding the SQL statements, set executionMode to STATIC, and allowDynamicSQL to FALSE. Whenever your application requests to run the batched SQL statements, pureQuery looks in the pureQueryXML file for them. If the statements exist in the pureQueryXML file and they are bound, pureQuery runs them. If they do not exist in the pureQueryXML file or are not bound, pureQuery throws an exception because allowDynamicSQL is FALSE.
Heterogeneous SQL statement batching is useful for this type of application, reducing network traffic, but not losing the necessary ordering of execution of the INSERT, UPDATE, or DELETE statements.
When you capture statements for the application, set captureStatementBatchSQL to OFF. This setting causes pureQuery not to capture any of the SQL statements that the Statement.addBatch() method processes. None of those statements count against the limit set by maxNonParmSQL.
When you run your application after binding the other SQL statements, set executionMode to STATIC and allowDynamicSQL to TRUE. When the application requests to run the batched SQL statements, pureQuery does not look for them in the pureQueryXML file and runs them dynamically.