Home > Contents > Index >
Template Tags TOC | Alpha TOC | Tag Family TOC | Purpose TOC | Annotated TOC | Index
ics:catalogdef
Queries a table for its column definition and stores the results in a list.
Syntax
<ics:catalogdef listname="some list name"table="some table name"/>Parameters
listname (required)- List to contain column information for the table.
table (required)- Name of the table.
Description
The
ics:catalogdeftag queries a table for its column definition and stores the results in a list.The list contains a row for each column in the table. The
KEYandFOREIGNvalues are identical for each row in the resultset. The column names are as follows:
Column Name MeaningKEY Name of table's primary key (unknownif table is foreign).FOREIGN If table is foreign, value istrue. Otherwise, it isfalse.COL Name of the column in the table.COLTYPE The values forCOLTYPEcan be:
text
integer
double binary
date/time,upload
unknownCOLSIZE Size of the column based on database information.Error Numbers
The possible values of
errnoinclude:
Value Description -101 No rows found. -102 Empty column. -103 No such table. -104 No table definition.Example
The following example displays the table definition of a table called
movies:<ics:clearerrno/> <ics:catalogdef listname="table" from="movies"/> Key: <ics:listget listname="table" fieldname="KEY"/> <br> Foreign: <ics:listget listname="table" fieldname="FOREIGN"/> <br> <ics:listloop listname="table" > Colname: <ics:listget listname="table" fieldname="COLNAME"/> <br> Coltype: <ics:listget listname="table" fieldname="COLTYPE"/> <br> Colsize: <ics:listget listname="table" fieldname="COLSIZE"/> <br> </ics:listloop>See Also
Home > Contents > Index > ![]()
Oracle JSP Tag Reference
Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.