swirl Guide to OmniMark 6   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesOMX VariablesErrors
 
  Related Syntax   Related Concepts   Other Library Functions  
function   dbExecute   Available in:
Professional
Enterprise

Library: omdb - high level database access
Include: omdb.xin

Declaration

  define external function dbExecute
         value dbDatabase database
     SQL value stream     statement
  where
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

    Related Syntax
   dbQuery
   dbDatabase
 
Related Concepts
   Using the OMDB library
 
Other Library Functions
   dbClose
   dbCommit
   dbDatabase
   dbExecute
   dbField
   dbFieldPrepare
   dbFieldSink
   dbFieldValue
   dbIsVersionCompatible
   dbLibraryVersion
   dbLibraryVersionOCI8
   dbLibraryVersionOCI8i
   dbLibraryVersionODBC
   dbOpenOCI8
   dbOpenOCI8i
   dbOpenODBC
   dbProcedure
   dbProcedureClose
   dbProcedureExecute
   dbProcedureOpen
   dbQuery
   dbRecordExists
   dbRecordMove
   dbRecordSetMove
   dbRollback
   dbSetTransactionType
   dbStatement
   dbStatementCompile
   dbStatementDiscard
   dbStatementExecute
   dbStatementStreamingExecute
   dbTable
   dbTableClose
   dbTableDelete
   dbTableInsert
   dbTableOpen
   dbTableUpdate
 
----  

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

OmniMark 6.5 Documentation Generated: December 23, 2002 at 6:25:12 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © OmniMark Technologies Corporation, 1988-2002.