Select

Use a Select bean to access relational data.

Palette category
Database
Palette bean
Select
Project
IBM Data Access Beans
Package
com.ibm.ivj.db.uibeans
Type
Select

The Select bean has the following properties:

beanName
Specifies the name of the Select bean instance. It must follow standard naming rules for beans. The default name is Selectn, where n is the number of Select beans with default names; for example, the first default name is Select1.

currentRow
Specifies the current row of the result set. A value of -1 indicates that there is no current row, that is, an SQL statement has not yet been executed or the result set is empty.

currentRowInCache
Specifies the current row in cache. A value of -1 indicates that there is no current row, that is, an SQL statement has not yet been executed or the result set is empty.

fillCacheOnExecute
Specifies whether all the rows of the result set are fetched into memory (cache) or only a subset of the result set. A value of True means that all the rows of the result set are fetched, up to a maximum number of rows. The maximum number of rows is the maximumRows value, or the product of the packetSize value multiplied by the maximumPacketsInCache value--whichever is smaller. Suppose a result set is 1000 rows, fillCacheOnExecute is True, maximumRows is 100, packetSize is 10, and maximumPacketsInCache is 50. Executing an SQL statement fetches 100 rows into the cache, that is, the value of maximumRows.

A False value means that only the number of rows in the result set needed to satisfy the SQL statement are fetched into the cache. For example, if a result set is 1000 rows, but the application only displays 10 rows, only 10 rows are fetched into the cache.

The default value is True.

lockRows
Specifies whether a lock is immediately acquired for the row. A value of True means a lock is immediately acquired for the current row. A False value means a lock is not acquired for the row until an update request is issued. The default value is False.

maximumPacketsInCache
Specifies the maximum number of packets allowed in the cache. A packet is a set of rows. A value of 0 means that there is no maximum. The default value is 0.

maximumRows
Specifies the maximum number of rows that can be fetched into the cache. A value of 0 means that there is no maximum. The default value is 0.

packetSize
Specifies the number of rows in a packet. A value of 0 means that there is no maximum. The default value is 0.

query
Specifies the connection alias and SQL specification for the Select bean. See Specifying a Connection Alias and Making an SQL Specification for further information.

readOnly
Specifies whether updates to the data are allowed. A True value means that updates are disallowed even if the database manager would permit them. A False value means that updates are allowed, provided that the database manager permits them. he default value is False.


Related procedures
Accessing Relational Data

Related references
DBNavigator