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

db.commit

 
 

Library: 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 db.open functions.


Purpose

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

Requirements

The db.database object database must be:

Usage Notes

Calls to this function are only required if the database transaction type is db.manual-commit.

You may call the db.commit function if the transaction type for the database is auto-commit 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.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.