You can set this property to TRUE after you create a pureQueryXML file to use with an application. You cannot set it to TRUE when you are capturing SQL statements.
This property can take these values:
DB2Connection.prepareDB2OptimisticLockingQuery
DB2Statement.executeDB2OptimisticLockingQuery
The following table shows the capturedOnly, executionMode and allowDynamicSQL combinations and resulting operations:
capturedOnly | executionMode | allowDynamicSQL | SQL statement matched | Result |
---|---|---|---|---|
TRUE | STATIC | TRUE | YES | isBindable = True, Run the SQL statement statically isBindable = False, Run the SQL statement dynamically |
TRUE | STATIC/DYNAMIC | TRUE/FALSE | NO | Return an error |
TRUE | STATIC | FALSE | YES | isBindable = True, Run the SQL statement statically isBindable = False, Return an error |
TRUE | DYNAMIC | TRUE/FALSE | YES | Run the SQL statement |
FALSE | STATIC | TRUE | YES | isBindable = True, Run the SQL statement statically. isBindable = False, Run the SQL statement dynamically |
FALSE | STATIC | TRUE | NO | Run the SQL statement dynamically |
FALSE | STATIC | FALSE | YES | isBindable = True, Run the SQL statement statically. isBindable = False, Return an error |
FALSE | STATIC | FALSE | NO | Return an error |
FALSE | DYNAMIC | TRUE/FALSE | YES/NO | Run the SQL statement |
When using DB2® Call Level Interface (CLI) or the IBM® Data Server Driver with pureQuery Runtime, you can use the pureQuery Runtime property as a configuration keyword.
When the keyword capturedOnly=TRUE is set for a CLI or .NET application that is enabled with pureQuery client optimization, statements with the statementType SET_METHOD are restricted by pureQuery Runtime if the statement is not in the pureQueryXML file.