Home > Contents > Index >
Expanded TOC   |    Accordion TOC   |    Annotated TOC   |    Index

 

ICS.SQL

Executes a SQL statement.

Syntax

Parameters

from
The name of the table(s) to which the resultset should be cached. To specify multiple tables, separate the table names with commas. For example, the following string tells the SQL method to cache the resultset in tables named apples and bananas:

If you specify multiple tables, 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).

sqlstmt
The SQL statement to execute.

listname
The name of the list created. The list can be referenced using this name from an XML tag or using the GetList method. If you specify null, SQL will generate the name of the list for you.

limit
The maximum number of rows returned from the query. To indicate no limit, set this value to -1.

bCache
true to cache the results; false otherwise. Regardless of the value of bCache, the existing cache will be used to generate the return value, but new resultsets will not be cached. Setting bCache to false can hurt performance.

errstr
For return values; may contain error information.

Description

The SQL method executes a SQL statement.

The SQL query may be database-specific. The resultset associated with the query is registered against the table(s) specified in the from parameter.

The SystemSQL table allows the specification of the name of the table to cache the results of the query. The resultset associated with the query is registered against the table name designated in the SystemSQL table.

Returns

IList object containing the results. When certain SQL statements (delete, update, and so on) are executed successfully, no resultset, and hence no IList, is returned.

Errno

If IList is null, use GetErrno to find the error. When certain SQL statements (delete, update, and so on) are executed successfully, no resultset, and hence no IList, is returned. If no IList is returned, to find the error. When certain SQL statements (delete, update, and so on) are executed successfully, no resultset, and hence no IList, is returned. If no IList is returned, GetErrno returns error number -502. This does not necessarily indicate an error condition.

Example

See the example for SQLExp .

 

  Home > Contents > Index >

FatWire JAVA Reference
Copyright 2005 by FatWire Software
All rights reserved.