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

db.commit

 
 

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

Declaration

  define external function db.commit
         value db.database database

Argument definitions

database
is a db.database object obtained by opening a connection to a database using one of the dbOpen functions.


Purpose

Use db.commit to commit all the insert, delete, or update operations performed since the last db.commit or dbRollback.

Requirements

The db.database object database must be:

Usage Notes

You may call the db.commit function if the transaction type for the database is autocommit without generating an exception.

Example


  import "omdb.xmd" prefixed by db.

  process
      local db.database this-db
      local db.table course
      local stream SQL-insert initial
      {  "insert into Course values " ||
          " ( '503', 'Learning Through Pain'  )"
      }

      local stream course-data variable initial
      {   '504' with key 'cid',
            'What is that Sound?' with key 'CourseName'
      }

      set this-db to db.open-odbc 'dbDemo'
      set course to db.open-table in this-db named 'Course'
      db.set-transaction-type of this-db to db.manual-commit

      db.execute-in this-db sql SQL-insert

      db.insert into course from course-data

      db.commit this-db

    Related Syntax
   db.execute-in
   db.database
   db.insert
   db.update
   db.delete
   db.execute
   db.set-transaction-type
   db.rollback
   dbStatementExecute
 
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.