swirl Guide to OmniMark 6   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesOMX VariablesErrors
 
  Related Syntax   Related Concepts   Other Library Functions  
function   dbCommit   Available in:
Professional
Enterprise

Library: omdb - high level database access
Include: omdb.xin

Declaration

  define external function dbCommit
         value dbDatabase database
  where
database
is a dbDatabase object obtained by opening a connection to a database using one of the dbOpen functions.


Purpose

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

Requirements

You must include the following line at the beginning of your OmniMark program:

  include "omdb.xin"

The dbDatabase object database must be:

Usage Notes

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

Example


  process

      local dbDatabase this-db
      local dbTable 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 dbOpenODBC 'dbDemo'
      set course to dbTableOpen this-db table 'Course'
      dbSetTransactionType this-db to DB_MANUAL_COMMIT

      dbExecute this-db sql SQL-insert

      dbTableInsert course from course-data

      dbCommit this-db

    Related Syntax
   dbExecute
   dbDatabase
   dbTableInsert
   dbTableUpdate
   dbTableDelete
   dbProcedureExecute
   dbSetTransactionType
   dbRollback
   dbStatementExecute
 
Related Concepts
   Using the OMDB library
 
Other Library Functions
   dbClose
   dbCommit
   dbDatabase
   dbExecute
   dbField
   dbFieldPrepare
   dbFieldSink
   dbFieldValue
   dbIsVersionCompatible
   dbLibraryVersion
   dbLibraryVersionOCI8
   dbLibraryVersionOCI8i
   dbLibraryVersionODBC
   dbOpenOCI8
   dbOpenOCI8i
   dbOpenODBC
   dbProcedure
   dbProcedureClose
   dbProcedureExecute
   dbProcedureOpen
   dbQuery
   dbRecordExists
   dbRecordMove
   dbRecordSetMove
   dbRollback
   dbSetTransactionType
   dbStatement
   dbStatementCompile
   dbStatementDiscard
   dbStatementExecute
   dbStatementStreamingExecute
   dbTable
   dbTableClose
   dbTableDelete
   dbTableInsert
   dbTableOpen
   dbTableUpdate
 
----  

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ OMX ] [ ERRORS ]

OmniMark 6.5 Documentation Generated: December 23, 2002 at 6:25:12 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © OmniMark Technologies Corporation, 1988-2002.