Home > Contents > Index >
SETVERSIONS
Sets the number of revisions stored for each row in a tracked table.
Syntax
<SETVERSIONS TABLE="TABLE_NAME
" [NUMVERSIONS="MAX_VERSIONS
"]/>Parameters
TABLE (required)
- Table to modify maximum number of versions
NUMVERSIONS (optional)
- Maximum number of versions to store for each row. When the maximum is reached, the oldest version is removed. A value of 0 (zero) indicates an unbounded number of versions stored. If
MAX_VERSIONS
is smaller than the current number of versions on the table, those versions remain and can be removed manually.
Description
The
SETVERSIONS
tag sets the number of revisions stored for each row in a tracked table. The current user must havertadmin
privileges on the table.Error Numbers
The possible values of
errno
include:
Value Description -1000 Command failure. Check theerrdetail
variable for the specific error.Example
This example assumes all
SETVERSION
parameters are exposed on an HTML form. It first checks whether the parameters exist, clears any values fromerrno
, and then sets the maximum number of revisions stored on the table.
<!-- Make sure required parameters exist --> <IF COND="IsVariable.tablename=false"> <THEN> <SETVAR
NAME="tablename" VALUE=""/> </THEN> </IF> <IF
COND="IsVariable.numversions=false"> <THEN> <SETVAR
NAME="numversions" VALUE=""/> </THEN> </IF> <!-- clear out errno --> <SETVAR
NAME="errno" VALUE="0"/> <!-- do the track --> <SETVERSIONS TABLE="Variables.tablename" NUMVERSIONS="Variables.numversions"/> <!-- See if set succeeded --> <IF
COND="Variables.errno=0"> <THEN> <!-- if succeeded, note it--> SetVersions succeeded for <CSVAR
NAME="Variables.tablename"> <BR/> </THEN> <ELSE> <!-- otherwise, call an error reporting element --> SetVersions failed.<BR/> </ELSE> </IF>
Home > Contents > Index > Oracle XML Tag Reference
Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.