Fetching Records

From InterBase

Go Up to Using Cached Updates


By default, when you enable cached updates, datasets automatically handle fetching of data from the database when necessary. Datasets fetch enough records for display. During the course of processing, many such record fetches may occur. If your application has specific needs, it can fetch all records at one time. You can fetch all records by calling the dataset’s FetchAll method. FetchAll creates an in-memory, local copy of all records from the dataset. If a dataset contains many records or records with large Blob fields, you may not want to use FetchAll.

Client datasets use the PacketRecords property to indicate the number of records that should be fetched at any time. If you set the FetchOnDemand property to True, the client dataset automatically handles fetching of data when necessary. Otherwise, you can use the GetNextPacket method to fetch records from the data server. For more information about fetching records using a client dataset, see Requesting data from the Source Dataset or Document in the Delphi Developer’s Guide.

Advance To: