|  | 
 | ||||
|        | |||||
|  | ||||||
| Related Syntax | Related Concepts | Other Library Functions | ||||
| function | db.execute-in | 
| Library: Database access (OMDB) Import: omdb.xmd | 
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
Use db.execute-in to execute a single statement on the specified database.
The db.database object database must be:
The string variable statement must not be empty (else external exception OMDB105).
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.
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')")
Copyright © Stilo International plc, 1988-2008.