Next Previous Up Top Contents Index

1 The SQL-ODBC Library

1.5 Result-set collections

A result-set collection, in spirit, contains the result of an SQL SELECT statement. To provide these results, result-set collections and their methods control the retrieval of elements from the database. Each element of a result set is a record and each element of a record is a value. The SQL-ODBC library does not provide any classes to represent columns; the elements of a record are just Dylan objects.

Result-set classes, in conjunction with the methods defined on them, provide a protocol to retrieve data from a database. Result-sets do not necessarily contain the records from the database. A result set could cache a small subset of the records retrieved for performance reasons. The logic for retrieving a record from a result set (from the database) is as follows:

1. Perform an internal fetch: values are stored into bindings established during SQL statement preparation. A record object is created during the preparation of the SQL statement which represents the values of the record (collection of values).
2. Invoke the liaison method on the record object. The result of the liaison function is the result of the collection access.

The columns of a record are processed when the columns are retrieved from the record object. This includes checking for null values and performing data coercion if a coercion-policy is supplied.

1.5.1 - Record class
1.5.2 - Result-set policy class
1.5.3 - Result-set classes
<forward-only-result-set>
<scrollable-result-set>
1.5.4 - Liaison functions
1.5.5 - Coercion policies

OLE, COM, ActiveX and DBMS Reference - 31 MAR 2000

Next Previous Up Top Contents Index