This documentation is archived and is not being maintained.

ADODC.CacheSize Property

Gets or sets the number of records that are cached in local memory for the current Recordset.

Namespace:  Microsoft.VisualBasic.Compatibility.VB6
Assembly:  Microsoft.VisualBasic.Compatibility.Data (in Microsoft.VisualBasic.Compatibility.Data.dll)

[SRDescriptionAttribute("ADODC_DESCCacheSize")]
public int CacheSize { get; set; }

Property Value

Type: System.Int32
An Integer that specifies the number of records that are cached in local memory for the current Recordset object. The default is 50 records.

The CacheSize value tells the provider how many records to keep in its buffer and how many records to fetch at one time to local memory. For example, when set to 10, after opening the first Recordset, the provider fetches the first 10 records into local memory. Therefore, as you move forward from the current record, the provider returns the data values from the local memory buffer. As soon as you move past the last record, the next 10 records are fetched from the data source into the cache.

While you can change value during the life of the cursor, the change only affects the number of records in the cache after the next fetch from the data source.

NoteNote:

Functions and objects in the Microsoft.VisualBasic.Compatibility.VB6 namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic 2008. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0
Show: