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

db.execute-in

 
 

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

Declaration

define external function db.execute-in
             value db.database database
         sql value string      statement optional initial {''}

or

define external function db.execute-in
             value db.database database
   statement value string      statement optional initial {''}

Argument definitions

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


Purpose

Use db.execute-in to execute a single statement on the specified database.

Requirements

The db.database object database must be:

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

Usage Notes

When working with a relational database, 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 - Relational Database:

This example shows how to use execute-in to insert updated course information into an ODBC database:

  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.document-writer-sedna
   db.execute
   db.execute-in
   db.field
   db.insert
   db.is-null
   db.move-dynamic-record
   db.move-record
   db.omdb-version
   db.omdb-version-oci10g
   db.omdb-version-oci11g
   db.omdb-version-oci8i
   db.omdb-version-oci9i
   db.omdb-version-odbc
   db.omdb-version-sedna
   db.open-oci10g
   db.open-oci11g
   db.open-oci8i
   db.open-oci9i
   db.open-odbc
   db.open-procedure
   db.open-sedna
   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 ] [ LEGACY LIBRARIES ] [ ERRORS ]

OmniMark 8.2.0 Documentation Generated: March 13, 2008 at 3:27:39 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2008.