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
SystemSQL
table.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:callsql
tag retrieves and executes an SQL query stored in theSystemSQL
table. The resultset of the query is cached against the table name specified for the query in theSystemSQL
table. The table name must exist in the database prior to callingics:callsql
.
Note
The
deftable
column in the SystemSQL table can specify a comma-separated list of table names.errno
The possible values of
errno
include:
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 > ![]()
FatWire JSP Tag Reference
Copyright 2005,2006,2007 by FatWire Software
All rights reserved.