RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TDataSet.BlockReadSize Property

Determines how many record buffers are read in each block.

Pascal
property BlockReadSize: Integer;
C++
__property int BlockReadSize;

Setting BlockReadSize to a value greater than 0 puts the dataset in the dsBlockRead state. It remains in that state until you set BlockReadSize to 0 or change the dataset's state in some other manner (such as putting it in edit mode). 

For all TDataSet descendants, data-aware controls are not updated and data events are not triggered when the dataset is in the dsBlockRead state. Thus, you can set BlockReadSize to a positive value to scan through the entire dataset quickly without updating data-aware controls. 

For BDE-enabled datasets, setting BlockReadSize also causes the dataset to fetch database information in blocks of BlockReadSize records, which it then buffers. This minimizes traffic between your application and the database server. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!