当前位置: 首页 > 网络学院 > 服务端脚本教程 > ADO > ADO CacheSize 属性

ADO
ADO介绍
ADO数据库连接
ADO记录集
ADO显示记录
ADO查询语句
ADO记录排序
ADO添加记录
ADO更新记录
ADO删除记录
ADO演示
ADO提升执行速度
ADO Command对象
ADO Connection对象
ADO Error
ADO Field
ADO Parameter
ADO 属性
ADO Record
ADO Recordset
ADO Stream

ADO CacheSize 属性


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 365 ::
收藏到网摘: n/a

The CacheSize property sets or returns a long value that specifies the number of records that can be cached locally in memory. The value must be greater than 0.
CacheSize属性的作用是:指定允许在本地内存中进行缓存的记录数量。其值必须大于0。

Note: You can change this property any time, as long as the Recordset exists, but remember that the cached content will not change until the next retrieval from the database.
注意:只要记录存在,你就可以在任何时候改变这个属性值。但是要记住的一点就是,在下一次重新获取数据库中的数据之前,缓存的内容不会发生任何改变。

The default value for this property is 1. This means that only one record is fetched and cached at a time. For large databases, this is not efficient. A larger value will speed up operations, but remember that cached records may not show recent changes made to the database. To avoid this you can call the Resync method regularly, which will update the cache.
该属性默认的值为1。这就意味着一次只能获取一条记录并对其进行缓存,这对一个大型数据库来说,效率太低。大值往往可以加快操作的速率,但是也不要忽略这点,即:被缓存的记录不会显示近期在数据库中做出的更改。为了避免这点发生,你通常可以请求Resync方法来更新你的缓存信息。

Syntax
语法

objRecordset.CacheSize

评论 (0) All

登陆 | 还没注册?