Baanboard.com

Go Back   Baanboard.com

User login

Frontpage Sponsor

Main

Google search


Poll
How big is your Baan-DB (just Data AND Indexes)
0 - 200 GB
18%
200 - 500 GB
26%
500 - 800 GB
3%
800 - 1200 GB
9%
1200 - 1500 GB
12%
1500 - 2000 GB
12%
> 2000 GB
21%
Total votes: 34

Baanboard at LinkedIn


Reference Content

 
Transaction handling
By patvdv at 26 Feb 2008 - 21:56

Transaction handling

With respect to database actions, a transaction is a sequence of related actions that are treated as a unit. The actions that make up a transaction are processed in their entirety, or not at all.

A transaction ends with the function commit.transaction() (all changes made during the transaction are stored in the database) or with the function abort.transaction() (no changes are stored in the database). A transaction starts with the first database call after the beginning of a process, or with the first database call after the preceding transaction has ended.

A transaction is automatically rolled back (that is, it is undone) when a process is canceled and if a program ends without a commit.transaction() or abort.transaction() after the last database call.

Certain database actions cannot be placed within a transaction, because they cannot be rolled back. These actions are: db.create.table() and db.drop.table(). These functions can be called only at the start of a program or after the end of the preceding transaction. These functions will not start a new transaction.

You can set a retry point immediately before a transaction. In case of an error, the system returns to this point and re-executes the transaction from there.

A read-only transaction is a transaction in which you are permitted only to read records (without lock) from the database. A read-only transaction starts with the function set.transaction.readonly() (this must be called after ending the preceding transaction or at the beginning of the program) and ends with a commit.transaction() or abort.transaction().

Related topics


0
No votes yet


All times are GMT +2. The time now is 20:08.


©2001-2018 - Baanboard.com - Baanforums.com