Home > Contents > Index > 
Template Tags TOC | Alpha TOC | Tag Family TOC | Purpose TOC | Annotated TOC | Index 
ics:catalogmanager.updaterows
Modifies field values for multiple rows in a table using
ics:catalogmanager.Syntax
<ics:catalogmanager>
<ics:argument name="ftcmd" value="updaterows" /> <ics:argument name="tablenameN" value="table" /> [<ics:argument name="columnnameN" value="columnname"/>] [<ics:argument name="urlcolumnname_folderN" value="folder name"/>] [<ics:argument name="columnname_fileN" value="file name"/>] [<ics:argument name="tablekeyN" value="key value"/>] [<ics:argument name="tablekeyvalueN" value="value"/>]</ics:catalogmanager>Parameters
ftcmd (required)- Value must be set to
 updaterows.
tablename (required)- Name of the table containing rows to be updated.
 
columnnameN (optional)- Each column in the row to be updated.
 columnnameis a table column name. The value ofNcorresponds to the row number in the resultset that you want to update.
urlcolumnname_folderN (optional)- 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).
columnname_fileN (required for non-binary files)- 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
 tablekeyNparameter 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
 tablekeycolumm of the row you want to update. The value ofNcorresponds to the row number in the resultset that you want to update.- This parameter is required only if the
 tablekeyparameter is used.
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.errno
The possible values of
errnoinclude:
 Value Description -103 No such table. -104 No table definition. -105 Database error.Example
The following example updates description column for id=100 and id=101.
Original data
id description quantity 100 Apple 100 102 Orange 300 <ics:catalogmanager>
<ics:argument name="ftcmd" value="updaterow2"/>
<ics:argument name="tablename" value="ExampleTable"/>
<ics:argument name="id0" value="100"/>
<ics:argument name="description0" value="Apples"/>
<ics:argument name="id1" value="101"/>
<ics:argument name="description1" value="Oranges"/>
</ics:catalogmanager>
Changed data
id description quantity 100 Apples 100 102 Oranges 300 See Also
The following
ics:catalogmanagercommands:ics:catalogmanager.updaterows2
ics:catalogmanager.replacerows
Home > Contents > Index > ![]()
FatWire JSP Tag Reference
Copyright 2005 by FatWire Software
All rights reserved.