If an Embedded SQL statement can use persistent binding but does not use a cursor, you control the statement’s bindings with the -p and -b options when precompiling the statement. Table 9-3 describes how these options affect a statement that uses no cursor.
Options used to precompile statement |
Effect on statement’s bindings |
---|---|
Neither -p nor -b |
No bindings persist. |
-p only |
Only input bindings persist. |
-b only |
No bindings persist. |
Both -p and -b |
All bindings persist. |
If the statement’s bindings persist, they do so until your program closes the connection over which the statement executes. The bindings persist throughout all executions of the statement, even if other statements execute in the meantime. If the statement’s bindings do not persist, binding occurs each time the statement executes.