Home > Contents > Index > 
Template Tags TOC | Alpha TOC | Tag Family TOC | Purpose TOC | Annotated TOC | Index 
ics:catalogmanager.replacerows
Replaces multiple rows in a table using
ics:catalogmanager.Syntax
<ics:catalogmanager>
<ics:argument name="ftcmd" value="replacerows" /> <ics:argument name="tablename" value="table" /> [<ics:argument name="columnnameN" value="column name"/> [<ics:argument name="urlcolumnname_folderN" value="folder name"/>] [<ics:argument name="columnname_fileN" value="file name"/>]</ics:catalogmanager>Parameters
ftcmd (required)- Value must be set to
 replacerows.
tablename (required)- Name of the table that contains the rows to replace.
 
columnnameN (optional)- Each column in the row to be replaced.
 Must contain at least one argument per row with primarykey column being the value of columnname.columnnameis a table column name. The value ofNcorresponds to the row number--in the resultset--that you want to replace.
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. 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 agrument name must have_fileappended to the table's column name (for example,urltext_file).
Description
The
replacerowscommand replaces multiple rows in a table. If a value is not specified for a column, the column value is cleared.errno
The possible values of
errnoinclude:
 Value Description -103 No such table. -104 No table definition. -105 Database error.Example
The following example updates ExampleTable contents (2 updates and 1 insert).
Original data
id description quantity 100 Apple 100 102 Grape 300 <ics:catalogmanager> <ics:argument name="ftcmd" value="replacerows"/> <ics:argument name="tablename" value="ExampleTable"/> <ics:argument name="id0" value="100"/> <ics:argument name="description0" value="Apple"/> <ics:argument name="quantity0" value="600"/> <ics:argument name="id1" value="101"/> <ics:argument name="description1" value="Orange"/> <ics:argument name="quantity1" value="700"/> <ics:argument name="id2" value="102"/> <ics:argument name="description2" value="Grape"/> <ics:argument name="quantity2" value="800"/> </ics:catalogmanager>Changed data
id description quantity 100 Apple 600 101 Orange 700 102 Grape 800 See Also
The following
ics:catalogmanagercommands:
Home > Contents > Index > ![]()
FatWire JSP Tag Reference
Copyright 2005 by FatWire Software
All rights reserved.