Home > Contents > Index >
LOCK
Locks a record for the current user in a tracked table.
Syntax
<LOCK TABLE="TABLE_NAME"
ASSET="PRIMARY_KEY"/>Parameters
TABLE (required)- Name of the tracked table.
ASSET (required)- Value of the primary key for the row to lock.
Description
The
LOCKtag locks a record for the current user in a tracked table. Once a row is locked, the current user can modify fields in the row. The current user must have write access to the table.Error Numbers
The possible values of
errnoinclude:
Value Description -1000 Command failure. Check theerrdetailvariable for the specific error.Example
This example assumes all
LOCKparameters are exposed on an HTML form. It first checks whether the parameters exist, clears any values fromerrno, and then locks the row.
<!-- Make sure required parameters exist --> <IFCOND="IsVariable.tablename=false"> <THEN> <SETVARNAME="tablename" VALUE=""/> </THEN> </IF> <IFCOND="IsVariable.asset=false"> <THEN> <SETVARNAME="asset" VALUE=""/> </THEN> </IF> <!-- clear out errno --> <SETVARNAME="errno" VALUE="0"/> <!-- do the lock --> <LOCK TABLE="Variables.tablename" ASSET="Variables.asset"/> <!-- See if lock succeeded --> <IFCOND="Variables.errno=0"> <THEN> <!-- if succeeded, note it--> Lock succeeded for <CSVARNAME="Variables.asset"/> <BR/> </THEN> <ELSE> <!-- otherwise, call an error reporting element --> Lock failed.<BR/> </ELSE> </IF>See Also
Home > Contents > Index > ![]()
Oracle XML Tag Reference
Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.