Home > Contents > Index >
Template Tags TOC | Alpha TOC | Tag Family TOC | Purpose TOC | Annotated TOC | Index
ics:catalogmanager.addrows
Adds multiple rows to a table using
ics:catalogmanager
.Syntax
<ics:catalogmanager>
<ics:argument name="ftcmd" value="addrows"/> <ics:argument name="tablename" value="table"/> [<ics:argument name="columnnameN_folder" value="folder name"/>] [<ics:argument name="columnnameN" value="column name"/>] [<ics:argument name="columnnameN_file" value="file name"/>]</ics:catalogmanager>Parameters
ftcmd (Required)
- Value must be set to
addrows
.
tablename (Required)
- Table name to add rows.
columnnameN_folder (Optional)
- The syntax columnname_folderN is deprecated.
- 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. N is the row counter.
- 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
).
columnnameN (Required for non-binary files)
- Name of the file you want to upload. The
columnname
is a table column name. 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
).
columnnameN_file (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 argument name must have_file
appended to the table's column name (for example,urltext_file
).
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 two new row to the table named movies.
<ics:catalogmanager> <ics:argument NAME="ftcmd" VALUE="addrows" /> <ics:argument NAME="tablename" VALUE="movies" /> <ics:argument NAME="urlcolumnname0_folder" VALUE="urlreview" /> <ics:argument NAME="columnname0" VALUE="Reviewer" /> <ics:argument NAME="urlcolumnname1_folder" VALUE="urlrating" /> <ics:argument NAME="columnname1" VALUE="Rating" /> </ics:catalogmanager>The next example modifies a table called CatalogExample. The default upload column is /export/home/temp. The CatalogExample table has the following columns: \x95 id (the table\x92s primary key) \x95 urlText \x95 description \x95 quantity
The sample form uses a CatalogManager command to add rows to the table when the user clicks the addrow button.The text files are uploaded to the upload folder and specified subfolder on the host machine. The first records text file, FirstAddrows.txt, is put in the /export/home/temp/ CatalogForm directory; the second records text file is put in the /export/home/temp/ CatalogForm/Part2 directory.
<FORM NAME="f1" ACTION="CatalogManager" METHOD="post"> <INPUT TYPE="hidden" NAME="tablename" VALUE="CatalogExample"/> <INPUT TYPE="hidden" NAME="id0" VALUE="3"/> <br/> FIRST URL:<INPUT TYPE="text" NAME="urlText0" VALUE="this text will be put in a file called FirstAddrows.txt"/><BR/> FIRST DESC:<INPUT TYPE="text" NAME="description0" VALUE="Variables.desc1" REPLACEALL="Variables.desc1"/><BR/> FIRST QUANTITY:<INPUT TYPE="text" NAME="quantity0" VALUE="1"/><BR/> FIRST FILE:<INPUT TYPE="text" NAME="urlText0_file" VALUE="FirstAddrows.txt"/><BR/> FIRST FOLDER:<INPUT TYPE="text" NAME="urlText0_folder" VALUE="CatalogForm"/><BR/> <INPUT TYPE="hidden" NAME="id1" VALUE="4"/><BR/> SECOND URL:<INPUT TYPE="text" NAME="urlText1" VALUE="The second file will be put in a file called SecondAddrows.txt"/><BR/> SECOND DESC:<INPUT TYPE="text" NAME="description1" VALUE="second record added"/><BR/> SECOND QUANTITY:<INPUT TYPE="text" NAME="quantity1" VALUE="12"/><BR/> SECOND FILE:<INPUT TYPE="text" NAME="urlText1_file" VALUE="SecondAddrows.txt"/><BR/> SECOND FOLDER:<INPUT TYPE="text" NAME="urlText1_folder" VALUE="CatalogForm/Part2"/><BR/> <INPUT TYPE="submit" NAME="ftcmd" VALUE="addrows"/><BR/> </FORM>See Also
The following
ics:catalogmanager
commands:
Home > Contents > Index > ![]()
Oracle JSP Tag Reference
Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.