Enable the deferred-PREPARE Feature
- Set the IFX_DEFERRED_PREPARE environment
variable to
1
.When you use the IFX_DEFERRED_PREPARE environment variable to enable the Deferred-PREPARE feature, you automatically defer execution of the PREPARE statement until just before the OPEN statement executes for every PREPARE statement in any thread of the application.
The default value of the IFX_DEFERRED_PREPARE environment variable is
0
. If you set this environment variable from the shell, make sure that you set it before you start the application. - Execute the SQL statement, SET DEFERRED_PREPARE.
With the SET DEFERRED_PREPARE statement, you can enable the Deferred-PREPARE feature for a particular PREPARE statement. You can also enable or disable the feature in a particular connection or thread.
For more information about the IFX_DEFERRED_PREPARE environment variable, see the HCL OneDB™ Guide to SQL: Reference.