Home > Contents > Index >
Expanded TOC | Accordion TOC | Annotated TOC | Index
ICS.CallSQL
Executes a SQL statement stored in the SystemSQL table.
Syntax
public IList CallSQL(String qryname, String listname, int limit, boolean bCache, StringBuffer errstr)Parameters
qryname- Specify the value of the
qrynamecolumn that uniquely identifies the row whose SQL statement should be executed.
listname- The name of the list to be created as a result of the query. The resultset will be accessible from XML using this name. If you set
listnametonull,CallSQLwill generate a unique name for the list.
limit- Maximum number of rows returned; setting limit to
-1means no limit.
bCachetrueto cache the results;falseotherwise. Setting bCache to false can hurt performance. Regardless of the value ofbCache, the existing cache will be used in the return value.bCacheonly prevents new resultsets from being cached.
errstr- For return values; may contain error information.
Description
The
CallSQLmethod executes a SQL statement stored in theSystemSQLtable.The
deftablecolumn of theSystemSQLtable holds a list of the tables in which the resultsets will be cached. The tables specified indeftablemust all exist. If you specify multiple tables in thedeftablecolumn, the first table listed is the "primary" table, meaning that the resultset will be cached based on that table's caching rules (maximum cache size, timeout, and so on).Returns
IListobject containing the results. An empty result set returns anIListwith no data.Error Numbers
If
IListisnull, anerrnowill be set. Useto find the error.GetErrnoExample
The following example executes a SQL statement stored in the SystemSQL table. Before running this code, you would have to place a SQL statement named
Query1in the SystemSQL table:
StringBuffer errStr = new StringBuffer(); ics.ClearErrno() IList results = ics.CallSQL("Query1", null, -1, true, errStr); int errNum = ics.GetErrno();See Also
literal , SelectTo , SQL , SQLExp
Home > Contents > Index > ![]()
Oracle JAVA Reference
Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.