Library: Database access (OMDB legacy)
Include: omdb.xin

define external function dbStatementExecute
         value       dbStatement statement
   with  read-only   stream      values    optional
   null  value       stream      null      optional
 record  modifiable  dbField     record    optional

Argument definitions

is a compiled dbStatement object.
is a shelf containing the parameter data.
is an optional string representing null values.
is a shelf of dbField items bound to result set fields.


Use dbStatementExecute to execute a compiled SQL statement that was produced by the dbStatementCompile function.


You must include the following line at the beginning of your OmniMark program:

  include "omdb.xin"

The dbDatabase object supplied when the statement was compiled must be open (else external exception OMDB101).

The dbStatement object statement must be open (else external exception OMDB701).

If the dbStatement object is a compiled query, it requires the dbField shelf argument record to receive the results (else external exception OMDB704).

The input shelf values must:

If you specify any date, time, or timestamp values in the "values" parameter data, you must express them in the OmniMark Date and Time library format. When you call dbStatementExecute, you must supply data for all the defined parameters. You can express null data values as unattached shelf items or as the supplied null identifier string.

Usage Notes

dbStatementExecute allows you to execute a compiled statement and to specify all the parameter values at once. This is more efficient for small parameters.

For large parameters (for example, DB_BLOB types) when there is a large amount of data to be inserted, it is more efficient to use the dbStatementStreamingExecute function, as that avoids creating an entire copy of the data in memory prior to execution.

See dbStatementCompile for additional notes and examples.