Home > Contents > Index >
Template Tags TOC | Alpha TOC | Tag Family TOC | Purpose TOC | Annotated TOC | Index
ics:catalogmanager.deleterow
Deletes a row in a table using
ics:catalogmanager
.Syntax
<ics:catalogmanager>
<ics:argument name="ftcmd" value="deleterow" /> <ics:argument name="tablename" value="table" /> [<ics:argument name="Delete uploaded file(s)" value="yes|no"/>] [<ics:argument name="primarykey" value="columnname"/>] [<ics:argument name="tablekey" value="column name"/>] [<ics:argument name="tablekeyvalue" value="value"/>]</ics:catalogmanager>Parameters
ftcmd (required)
- Value must be set to
deleterow
.tablename (required)
- Name of the table containing the row to delete.
Delete uploaded file(s) (optional)
- Set to
yes
if the upload files associated with row should be deleted. Default isno
.primarykey (optional)
primarykey
is the column name of the primary key column. The value is the value of row's primary key.tablekey (optional)
- Use the
tablekey
parameter if you want to delete rows based on a value other than the primary key. The value oftablekey
is the column name of the column you use to perform the deletion. For example, if you want to delete a table based on the value in thetitle
column, thetablekey
parameter looks as follows:
inList.setValString("tablekey", "title")tablekeyvalue (optional)
- Value in the
tablekey
column of the row you want to delete. For example, if you want to delete a row with a value ofJaws
in thetitle
column, thetablekeyvalue
parameter looks as follows:
inList.setValString("tablekeyvalue", "Jaws")- This parameter is required only if the
tablekey
parameter is used.Description
The deleterow command deletes a row in a table. There are two options that you can use to delete a row with this command:
- To delete rows using the primary key, set the following parameters:
ftcmd
tablename
primarykey
- If the
primarykey
is id, you must have a variable calledid set
.- To delete one or more rows that match some "alternate" column value, set the following parameters:
ftcmd
tablename
tablekey
tablekeyvalue
Note
This is valid only if the primary key column does not have a variable set.
Error Numbers
The possible values of
errno
include:
Value Description -105 Database error.Example
The following example deletes a row by id = 1 from table ExampleTable
<ics:catalogmanager> <ics:argument name="ftcmd" value="deleterow" /> <ics:argument name="tablename" value="ExampleTable" /> <ics:argument name="id" value="1"/> </ics:catalogmanager>Alternatively, the following example deletes all rows with quantity=1
<ics:catalogmanager> <ics:argument name="ftcmd" value="deleterow" /> <ics:argument name="tablename" value="ExampleTable" /> <ics:argument name="tablekey" value="quantity"/> <ics:argument name="tablekeyvalue" value="1"/> </ics:catalogmanager>See Also
The following
ics:catalogmanager
commands:ics:catalogmanager.addrow
ics:catalogmanager.deleterows
Home > Contents > Index > ![]()
Oracle JSP Tag Reference
Copyright (c) 2013, 2016 Oracle and/or its affiliates. All rights reserved.