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

db.execute-in

 
 

Library: Interfaces, Database access (OMDB)
Import: omdb.xmd

Declaration

  define external function db.execute-in
         value db.database database
     sql value stream     statement

Argument definitions

database
is a db.database 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 db.execute-in to execute a single SQL statement on the specified database.

Requirements

The db.database 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 db.database OMX variable used to create the connection to the database. For example:

  import "omdb.xmd" prefixed by db.
  process
     local db.database my-database
           initial {db.open-odbc "dbDemo"}

     db.execute-in my-database
        sql ("insert into Course (cid, CourseName)"
             || " values ('456', 'Four-on-the-Floor Gearshifting')")

    Related Syntax
   db.query
   db.database
 
Related Concepts
   Using the OMDB library
 
Other Library Functions
   db.advance-recordset
   db.close
   db.commit
   db.compile-statement
   db.database
   db.delete
   db.discard
   db.execute
   db.execute-in
   db.field
   db.insert
   db.move-record
   db.omdb-version
   db.omdb-version-oci8
   db.omdb-version-oci8i
   db.omdb-version-odbc
   db.open-oci8
   db.open-oci8i
   db.open-odbc
   db.open-procedure
   db.open-table
   db.prepare
   db.procedure
   db.query
   db.reader
   db.record-exists
   db.rollback
   db.set-transaction-type
   db.statement
   db.streaming-execute
   db.table
   db.update
   db.writer
 
 

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

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

Copyright © Stilo Corporation, 1988-2005.