swirl
Guide to OmniMark 9   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
  Related Topics   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 Topics
 
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.