swirl
Guide to OmniMark 9   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
  Related Topics   Other Library Functions  
function  

dbStatementExecute

 
 

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

Declaration

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

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


Purpose

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

Requirements

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.

    Related Topics
 
Other Library Functions
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACY LIBRARIES ] [ ERRORS ]

OmniMark 9.1.0 Documentation Generated: September 2, 2010 at 1:38:10 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2010.