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

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. columnname is a table column name. The value of N corresponds to the row number--in the resultset--that you want to replace.
Must contain at least one argument per row with primarykey column being the value of columnname.

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 defdir column. You can have multiple upload columns.

Upload columns are designated by the prefix url. The column name in the table must begin with url (for example, urltext). The argument name must include the table's column name with _folder appended 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 _file appended to the table's column name (for example, urltext_file).

Description

The replacerows command 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 errno include:

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:catalogmanager commands:

ics:catalogmanager.updaterows

ics.catalogmanager.replacerow

  Home > Contents > Index >

FatWire JSP Tag Reference
Copyright 2005,2006,2007 by FatWire Software
All rights reserved.