skip to main content
Part 2: The 32-Bit/64-Bit Drivers : The Sybase Wire Protocol Driver : Connection Option Descriptions : Prepare Method
  
Prepare Method
Attribute
OptimizePrepare (OP)
Purpose
Determines whether stored procedures are created on the server for calls to SQLPrepare.
Valid Values
0 | 1 | 2 | 3
Behavior
If set to 0 - None, stored procedures are created for every call to SQLPrepare. This setting can result in decreased performance when processing statements that do not contain parameters.
If set to 1 - Partial, the driver creates stored procedures only if the statement contains parameters. Otherwise, the statement is cached and run directly at the time of SQLExecute.
If set to 2 - Full, stored procedures are never created. The driver caches the statement, executes it directly at the time of SQLExecute, and reports any syntax or similar errors at the time of SQLExecute.
If set to 3 - Full at Prepare, stored procedures are never created. This is identical to value 2 except that any syntax or similar errors are returned at the time of SQLPrepare instead of SQLExecute. Use this setting only if you must have syntax errors reported at the time of SQLPrepare.
Notes
*This connection option can affect performance.
Default
1 (Partial)
GUI Tab
Performance tab
See Also
See Performance Considerations for details.