Home > Contents > Index >
Template Tags TOC | Alpha TOC | Tag Family TOC | Purpose TOC | Annotated TOC | Index
ics:callsql
Retrieves and executes a SQL query stored in the
SystemSQLtable.Syntax
<ics:callsql qryname="query name" listname="list" [limit="maximum number of results"]/>Parameters
qryname (required)- Name of query to retrieve and execute.
listname (required)- Name of list to contain resultset.
limit (optional)- Maximum number of rows in the resultset. Note that there is no limit if the parameters are missing or set to a negative number.
Description
The
ics:callsqltag retrieves and executes an SQL query stored in theSystemSQLtable. The resultset of the query is cached against the table name specified for the query in theSystemSQLtable. The table name must exist in the database prior to callingics:callsql.
Note
The
deftablecolumn in the SystemSQL table can specify a comma-separated list of table names.Error Numbers
The possible values of
errnoinclude:
Value Description -15 No file found. -101 No rows found. -102 Empty column. -103 No such table. -104 No table definition.Example
<ics:clearerrno/> <ics:callsql qryname="gettables" listname="newsrs"/> <ics:if condition="<%=ics.GetErrno() == 0%>"> <ics:then> <ics:listloop listname="newsrs" > Tablename: <ics:listget listname="newsrs" fieldname="tblname"/><br> Directory: <ics:listget listname="newsrs" fieldname="defdir"/><br> </ics:listloop> </ics:then> <ics:else> report error </ics:else> </ics:if>See Also
Home > Contents > Index > ![]()
Oracle JSP Tag Reference
Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.