Delphi的TCustomADODataSet.CacheSize属性为何不起作用?(200分)

  • 主题发起人 主题发起人 yz_shi
  • 开始时间 开始时间
Y

yz_shi

Unregistered / Unconfirmed
GUEST, unregistred user!
Delphi中TCustomADODataSet的CacheSize属性为何不起作用?是否还有其它属性设置
才能使CacheSize起作用?
Delphi中对TCustomADODataSet的CacheSize属性的帮助如下:
Set CacheSize to control how many rows the ADO dataset provider keeps cached
in its buffer and how many to retrieve at one time into local memory.
Default value of CacheSize is 1 and the minimum allowed value is 1.

For example, if CacheSize is set to 20, when the dataset is first activated
the associated provider retrieves the first 20 rows into local memory.
As the row pointer is moved through this recordset, the provider retrieves
the data from the local memory buffer. If the datasetrow pointer moves beyond
the last of these 20 buffered rows, the provider retrieves the next 20.
CacheSize represents the maximum number of rows to retrieve at one time.
If the number of rows remaining to be retrieved is less than CacheSize,
the remaining rows are retrieved and no exception is raised. The number of rows
that can be returned by the provider can be less than all of the rows if the
ADO dataset componentMaxRecords property is set to other than the
default (all rows).
 
为什么说它不起作用呢?你想要它起什么作用?
 
adoDataSet没有cached属性
 
是怎么不起作用了?
 
adoDataSet有LockType的属性,可以设为batch的!
就可以cache了!
 
多人接受答案了。
 
后退
顶部