Home > Contents > Index >
CATALOGMANAGER.addrow
Adds a row to a table using the
CATALOGMANAGER
command.Syntax
<CATALOGMANAGER>
<ARGUMENT NAME="ftcmd" VALUE="addrow"/> <ARGUMENT NAME="tablename" VALUE="table"/> [<ARGUMENT NAME="urlcolumnname_folder" VALUE="folder name"/>] [<ARGUMENT NAME="columnname_file" VALUE="file name"/>] [<ARGUMENT NAME="columnname" VALUE="some column name"/>]</CATALOGMANAGER>Parameters
ftcmd (required)
- Value must be set to
addrow
.
tablename (required)
- The name of the table where you plan to add a row.
urlcolumnname_folder (optional)
- A 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. Note that 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_folder
appended to the column name (for example,urltext_folder
).
columnname_file (required for non-binary files)
- The name of the file you want to upload. The column name in the table must begin with
url
(for example,urltext
). The argument name must have_file
appended to the table's column name (for example,urltext_file
).
columnname (optional)
- The value of each column in the row to be added. The
columnname
is a table column name.
Description
The
addrow
command adds a row to a table.
Note
When adding a row to a table of type
obj
(an object table), the system createsVariables.newid
, which contains the system-assigned unique ID for the new record.Error Numbers
The possible values of
errno
include:
Value Description -103 No such table. -104 No table definition. -105 Database error.Example
The following example adds a new row to the table named
movies
.<SETVAR NAME="errno" VALUE="0"/> <CATALOGMANAGER SCOPED="GLOBAL"> <ARGUMENT NAME="ftcmd" VALUE="addrow" /> <ARGUMENT NAME="tablename" VALUE="movies" /> <ARGUMENT NAME="Reviewer" VALUE="John Doe" /> </CATALOGMANAGER> <IF COND="IsError.Variables.errno=true"> <THEN> <!--Handle error--> </THEN> </IF>The next example uses a table called
CatalogExample
. The default upload column is. The table has the following columns:
/export/home/temp
- id (table's primary key)
- urlText
- description
- quantity
The form uses the
CatalogManager
command. The row is added to the table when the user clicks the addrow button and the file,AddrowExample.txt
is added to the.
/export/home/temp/CatalogForm/<FORM NAME="f1" ACTION="CatalogManager" METHOD="post" <INPUT TYPE="hidden" NAME="tablename" VALUE="CatalogExample"/> KEY: <INPUT TYPE="text" NAME="id" VALUE="2"/> <BR/> URL: <INPUT TYPE="text" NAME="urlText" VALUE="this text will be put in a file called AddrowExample.txt"/> <BR/> DESC: <INPUT TYPE="text" NAME="description" VALUE="example record"/> <BR/> QUANTITY: <INPUT TYPE="text" NAME="quantity" VALUE="1"/><BR/> FILE: <INPUT TYPE="text" NAME="urlText_file" VALUE="AddrowExample.txt"/> <BR/> FOLDER: <INPUT TYPE="text" NAME="urlText_folder" VALUE="CatalogForm"/> <BR/> FTCMD: <INPUT TYPE="submit" NAME="ftcmd" VALUE="addrow"/> <BR/> </FORM>The next example uses the same table,
CatalogExample
. This example is similar to the previous example, except that the user browses and selects a file to upload. In addition, thecolumnname_file
parameter is not included in this example because the file is uploaded in binary mode.<FORM NAME="f1" ENCTYPE="multipart/form-data" ACTION="CatalogManager" METHOD="post" <INPUT TYPE="hidden" NAME="tablename" VALUE="CatalogExample"/> KEY: <INPUT TYPE="text" NAME="id" VALUE="3"/> <BR/> DESC: <INPUT TYPE="text" NAME="description" VALUE="second record"/> <BR/> QUANTITY: <INPUT TYPE="text" NAME="quantity" VALUE="1"/> <BR/> FILE: <INPUT TYPE="file" NAME="urlText" VALUE=""/> <BR/> FOLDER: <INPUT TYPE="text" NAME="urlText_folder" VALUE="CatalogForm"/> <BR/> <INPUT TYPE="hidden" NAME="ftcmd" VALUE="addrow"/> <INPUT TYPE="submit" VALUE="Add"/> </FORM>See Also
Home > Contents > Index > ![]()
Oracle XML Tag Reference
Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.