Επεξεργασία

Κοινή χρήση μέσω


ADODC.CacheSize Property

Definition

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

public:
 property int CacheSize { int get(); void set(int value); };
[Microsoft.VisualBasic.Compatibility.VB6.SRDescription("ADODC_DESCCacheSize")]
public int CacheSize { get; set; }
[<Microsoft.VisualBasic.Compatibility.VB6.SRDescription("ADODC_DESCCacheSize")>]
member this.CacheSize : int with get, set
Public Property CacheSize As Integer

Property Value

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

Attributes

Remarks

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.

Note

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. 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.

Applies to