Ask a question?
  • Contact Us
  • Support Case System
  • Support Forum

What Does Prepare Method Do?

This option is specific to the TDS Driver for MS & Sybase SQLServers, and can take the values None, Partial and Full (connectoptions -O [0, 1, 2] respectively) which are used to determines whether stored procedures are created on the server for calls to SQLPrepare.

When set to Full (-O 2), stored procedures are created for every call to SQLPrepare. This setting can result in decreased performance when processing statements that do not contain parameters.

When set to Partial (-O 1) (the initial default), the driver creates stored procedures only if the statement contains parameters. Otherwise, the statement is cached and run directly at the time of SQLExecute.

When set to None (-O 0), 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.