Home > Contents > Index >
CATALOGMANAGER.deleterow
Deletes a row in a table using the
CATALOGMANAGER
command..Syntax
<CATALOGMANAGER>
<ARGUMENT NAME="ftcmd" VALUE="deleterow" /> <ARGUMENT NAME="tablename" VALUE="table" /> [<ARGUMENT NAME="Delete uploaded file(s)" VALUE="yes|no"]/> [<ARGUMENT NAME="primarykey" VALUE="column name"]/> [<ARGUMENT NAME="tablekey" VALUE="column name"]/> [<ARGUMENT NAME="tablekeyvalue" VALUE="some value"]/></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)
- Value should be set to
yes
if 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 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 examples remove two rows from the Movie table.
id (primary key) rating title1
G Beauty and The Beast2
PG The Princess Bride3
R The GodfatherExample using the primary key column to delete a row:
<SETVAR NAME="errno" VALUE="0"/> <CATALOGMANAGER> <ARGUMENT NAME="ftcmd" VALUE="deleterow"/> <ARGUMENT NAME="tablename" VALUE="movie"/> <ARGUMENT NAME="id" VALUE="1"/> </CATALOGMANAGER> <IF COND="IsError.Variables.errno=true"> <THEN> <!--Handle error--> </THEN> </IF>Example using a column other than the primary key to delete a row:
<SETVAR NAME="errno" VALUE="0"/> <CATALOGMANAGER> <ARGUMENT NAME="ftcmd" VALUE="deleterow"/> <ARGUMENT NAME="tablename" VALUE="movie"/> <ARGUMENT NAME="tablekey" VALUE="title"/> <ARGUMENT NAME="tablekeyvalue" VALUE="The Princess Bride"/> </CATALOGMANAGER> <IF COND="IsError.Variables.errno=true"> <THEN> <!--Handle error--> </THEN> </IF>After both rows have been removed, the table looks as follows:
id (primary key) rating title 3 R The GodfatherSee Also
Home > Contents > Index > Oracle XML Tag Reference
Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.