|
|||||
|
||||||
Related Syntax | Related Concepts | Other Library Functions |
function |
db.commit |
Library: Interfaces, Database access (OMDB)
Import: omdb.xmd |
define external function db.commit value db.database database
Argument definitions
Use db.commit to commit all the insert, delete, or update operations performed since the last db.commit or dbRollback.
The db.database object database must be:
You may call the db.commit function if the transaction type for the database is autocommit without generating an exception.
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