Home > Contents > Index >
CATALOGMANAGER.updaterows
Modifies field values for multiple rows in a table using the
CATALOGMANAGERcommand.Syntax
<CATALOGMANAGER>
<ARGUMENT NAME="ftcmd" VALUE="updaterows" /> <ARGUMENT NAME="tablenameN" VALUE="table" /> [<ARGUMENT NAME="primarykeyN" VALUE="primary key value"/>] [<ARGUMENT NAME="columnnameN" VALUE="column name"/>] [<ARGUMENT NAME="urlcolumnnameN_folder" VALUE="folder name"/>] [<ARGUMENT NAME="columnnameN_file" VALUE="file name"/>] [<ARGUMENT NAME="tablekeyN" VALUE="key value"/>] [<ARGUMENT NAME="tablekeyvalueN" VALUE="some value"/>]</CATALOGMANAGER>Parameters
ftcmd (required)- Value must be set to
updaterows.
tablename (required)- Name of the table containing rows to be updated.
primarykeyN (optional)- Value of row's primary key. The
primarykeyparameter is the primary key's column name. The value ofNcorresponds to the row number--in the resultset--that you want to update.
columnnameN (optional)- Each column in the row to be updated.
columnnameis a table column name. The value of N corresponds to the row number--in the resultset--that you want to update.
urlcolumnnameN_folder (optional)- The syntax urlcolumnname_folderN is deprecated.
- A subfolder name to store the uploaded file. The file is then stored under the upload folder and the subfolder. The upload folder is specified in the SystemInfo table's
defdircolumn. Note that you can have multiple upload columns.
- Upload columns are designated by the prefix
url. The column name in the table must begin withurl(for example,urltext). The argument name must include the table's column name with_folderappended to the column name (for example,urltext_folder).
columnnameN_file (required for non-binary files)- The name of the file you want to upload. The column name in the table must begin with
url(for example,urltext). The argument name must have_fileappended to the table's column name (for example,urltext_file).
tablekeyN (optional)- Use the
tablekeyN parameter if you want to update rows based on a value other than the primary key. The value oftablekeyNis the column name of the column you use to perform the update. The value ofNcorresponds to the row number--in the resultset--that you want to update.
tablekeyvalueN (optional)- Value in the
tablekeycolumn of the row you want to update. The value of N corresponds to the row number--in the resultset--that you want to update.
Description
The
updaterowscommand modifies field values for multiple rows in a table. For fields other than url fields, the value of the field is modified. For url fields,updaterowsdeletes the file associated with the url field and modifies the url field to point to the newly uploaded file.Error Numbers
The possible values of
errnoinclude:
Value Description -103 No such table. -104 No table definition. -105 Database error.Example
This example updates the rows with
godzillaandtitanicin themoviestable, and changes the values of the comments column tomiss itandsee it, respectively.<SETVAR NAME="errno" VALUE="0"/> <CATALOGMANAGER SCOPED="GLOBAL"> <ARGUMENT NAME="ftcmd" VALUE="updaterows" /> <ARGUMENT NAME="tablename" VALUE="movies" /> <ARGUMENT NAME="id0" VALUE="1234" /> <ARGUMENT NAME="title0" VALUE="godzilla" /> <ARGUMENT NAME="comments0" VALUE="miss it" /> <ARGUMENT NAME="id1" VALUE="1235" /> <ARGUMENT NAME="title1" VALUE="titanic" /> <ARGUMENT NAME="comments1" VALUE="see it" /> </CATALOGMANAGER> <IF COND="Variables.errno=0"> <THEN> Update successful. </THEN> <ELSE> <CSVAR NAME="Update failed. See errno Variables.errno for more information."/> </ELSE> </IF>See Also
addrows
replacerows
updaterows
updaterows2
Home > Contents > Index > ![]()
Oracle XML Tag Reference
Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.