Fetching Records Asynchronously

From RAD Studio
Jump to: navigation, search

Go Up to Connecting an ADO Dataset to a Data Store

Unlike other datasets, ADO datasets can fetch their data asynchronously. This allows your application to continue performing other tasks while the dataset populates itself with data from the data store.

To control whether the dataset fetches data asynchronously, if it fetches data at all, use the ExecuteOptions property. ExecuteOptions governs how the dataset fetches its records when you call Open or set Active to True. If the dataset represents a query or stored procedure that does not return any records, ExecuteOptions governs how the query or stored procedure is executed when you call ExecSQL or ExecProc.

ExecuteOptions is a set that includes zero or more of the following values:

Execution options for ADO datasets :

Execute Option Meaning


The command or data fetch operation is executed asynchronously.


The dataset first fetches the number of records specified by the CacheSize property synchronously, then fetches any remaining rows asynchronously.


Asynchronous data fetches or command execution do not block the current thread of execution.


A command or stored procedure that does not return data. If any rows are retrieved, they are discarded and not returned.

See Also