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

dbExecute

 
 

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

Declaration

define external function dbExecute
       value dbDatabase database
   SQL value string     statement

Argument definitions

database
is a dbDatabase object obtained by opening a connection to a database using one of the dbOpen functions.
statement
is the SQL statement that you want to execute on the database.


Purpose

Use dbExecute to execute a single SQL statement on the specified database.

Requirements

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

  include "omdb.xin"

The dbDatabase object database must be:

The stream variable statement must not be empty (else external exception OMDB105).

Usage Notes

The SQL statement may modify the structure of the database or manipulate the data in the tables. It may be any non-select type of SQL statement.

Example:

This function makes use of the dbDatabase OMX variable used to create the connection to the database. For example:

            include "omdb.xin"
          process
             local dbDatabase my-database
             local stream SQL-insert initial
                { "insert into Course (cid, CourseName) "
                   || "values ('456', 'Four-on-the-Floor Gearshifting')"
                }
             set my-database to dbOpenODBC "dbDemo"
             dbExecute my-database
             	sql SQL-insert

      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.