RAD Studio |  |

Working with Record Sets
See Also
Collapse All

The Recordset property provides direct access to the ADO recordset object underlying the dataset component. Using this object, it is possible to access properties and call methods of the recordset object from an application. Use of Recordset to directly access the underlying ADO recordset object requires a good working knowledge of ADO objects in general and the ADO recordset object in specific. Using the recordset object directly is not recommended unless you are familiar with recordset object operations. Consult the Microsoft Data Access SDK help for specific information on using ADO recordset objects.

The RecordSetState property indicates the current state of the underlying recordset object. RecordsetState corresponds to the State property of the ADO recordset object. The value of RecordsetState is either stOpen, stExecuting, or stFetching. (TObjectState, the type of the RecordsetState property, defines other values, but only stOpen, stExecuting, and stFetching pertain to recordsets.) A value of stOpen indicates that the recordset is currently idle. A value of stExecuting indicates that it is executing a command. A value of stFetching indicates that it is fetching rows from the associated table (or tables).

Use RecordsetState values to perform actions dependent on the current state of the dataset. For example, a routine that updates data might check the RecordsetState property to see whether the dataset is active and not in the process of other activities such as connecting or fetching data.

See Also

Connecting an ADO Dataset to a Data Store

Filtering Records Based On Bookmarks

Using Batch Updates

Loading Data from and Saving Data to Files

Fetching Records Asynchronously

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!