Prepared Execution for Non-cursor Specification

For dynamic SQL statements other than cursor specifications, follow these general steps to execute the request:

  1. Prepare the SQL request using the PREPARE statement (or sqldynprep()), establishing an SQL request handle for the statement.
  2. Execute the request using the EXECUTE statement (or sqldynexec()).

Many SQL statements other than cursor specifications can take dynamic parameter markers, to provide, for example, input value for columns and search criteria when executing INSERT and searched UPDATE statements. When preparing these statements, you can specify an input SQLDA or a host language variable list as part of the dynamic EXECUTE statement. This provides the parameter values that correspond to your input columns or search criteria. This is similar to specifying the output SQLDA or host language variable list as part of the dynamic FETCH statement to retrieve the corresponding rows of a cursor specification.

For information on using dynamic parameter markers in non-OPEN cursor statements, see the "Using Dynamic Parameter Markers" section in this chapter. For more information on the dynamic ESQL statements used for prepared execution, see the "Prepared Execution" section.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095