Home > Contents > Index >
COMMIT
Creates a new revision of a record from a tracked table.
Syntax
<COMMIT TABLE="TABLE_NAME" ASSET="PRIMARY_KEY" [KEEPLOCKED="KEEPLOCKED_VAL"] [ANNOTATION="COMMENT"/>]Parameters
TABLE (required)
- Name of the table
ASSET (required)
- Value of the primary key for the record being committed.
KEEPLOCKED (optional)
- Indicates lock status of record after commit. Set value to
true
to indicate the record is still locked by user after the commit.
ANNOTATION (optional)
- Comment describing the new revision.
Description
The
commit
command creates a new revision of a record from a tracked table. The current user must have the record locked and have write access to the tracked table to perform this operation.Error Numbers
The possible value of
errno
include:
Value Description -1000 Command failure. Check theerrdetail
variable for the specific error.Example
The following example assumes all
COMMIT
parameters are exposed on an HTML form. It first checks whether the parameters exist, clears the value oferrno
, then commits the record.<--! Check whether required parameters exist--> <IF COND="IsVariable.tablename=false"> <THEN> <SETVAR NAME="tablename" VALUE=""/> </THEN> </IF> <IF COND="IsVariable.asset=false"> <THEN> <SETVAR NAME="asset" VALUE=""/> </THEN> </IF> <IF COND="IsVariable.annotation=false"> <THEN> <SETVAR NAME="annotation" VALUE=""/> </THEN> </IF> <IF COND="IsVariable.keeplocked=false"> <THEN> <SETVAR NAME="keeplocked" VALUE="false"/> </THEN> </IF> <!-- clear out errno --> <SETVAR NAME="errno" VALUE="0"/> <!-- do the commit --> <COMMIT TABLE="Variables.tablename" ASSET="Variables.asset" KEEPLOCKED="Variables.keeplocked" ANNOTATION="Variables.annotation"/> <!-- see if the commit succeeded --> <IF COND="Variables.errno=0"> <THEN> <!-- if succeeded, brag about it --> Commit succeeded for <CSVAR NAME="Variables.asset"/> <BR/> </THEN> <ELSE> <!-- otherwise, call an error reporting element --> Commit failed.<BR/> </ELSE> </IF>See Also
DELETEREVISION
HISTORY
LOCK
RELEASE
RETRIEVEREVISION
ROLLBACK
SETVERSIONS
TRACKTABLE
UNLOCKRECORD
UNTRACKTABLE
Home > Contents > Index > ![]()
Oracle XML Tag Reference
Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.