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
yesif the upload files associated with row should be deleted. Default isno.
primarykey (optional)primarykeyis the column name of the primary key column. The value is the value of row's primary key.
tablekey (optional)- Use the
tablekeyparameter if you want to delete rows based on a value other than the primary key. The value oftablekeyis 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 thetitlecolumn, thetablekeyparameter looks as follows:
inList.setValString("tablekey", "title")tablekeyvalue (optional)- Value in the
tablekeycolumn of the row you want to delete. For example, if you want to delete a row with a value ofJawsin thetitlecolumn, thetablekeyvalueparameter looks as follows:
inList.setValString("tablekeyvalue", "Jaws")- This parameter is required only if the
tablekeyparameter 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:
ftcmdtablenameprimarykey- If the
primarykeyis id, you must have a variable calledid set.- To delete one or more rows that match some "alternate" column value, set the following parameters:
ftcmdtablenametablekeytablekeyvalue
Note
This is valid only if the primary key column does not have a variable set.
Error Numbers
The possible values of
errnoinclude:
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:catalogmanagercommands:ics:catalogmanager.addrow
ics:catalogmanager.deleterows
Home > Contents > Index > ![]()
Oracle JSP Tag Reference
Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.