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

dbExecute

 
 

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

Declaration

  define external function dbExecute
         value dbDatabase database
     SQL value stream     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
   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 ] [ LEGACYLIBRARIES ] [ ERRORS ]

OmniMark 7.1.2 Documentation Generated: June 28, 2005 at 5:45:05 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © Stilo Corporation, 1988-2005.