PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK

  • Retrieving the records
  • Managing the ..CtCacheSize property
  • hQueryWithoutCorrection constant
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
CtCacheSize (Property)
In french: CxTailleCache
OLE DBNative Connectors (Native Accesses)Available only with these kinds of connection
..CtCacheSize is used to find out and modify the maximum number of records that can be stored in the cache of the Native MySQL Access.
Note: The size of the cache specified in ..CtCacheSize is ignored if this size was specified in the optional information of HDescribeConnection or HOpenConnection.
Managing the cache: operating mode
Whenever accessing an external database, the records retrieved are stored in the cache of the Native Access used before they are transmitted to the client computer.
The cache of a Native Access can contain a limited number of records. If the number of records to retrieve is greater than the maximum number of records defined for the cache, the records are retrieved in batches.
The maximum number of records that can be stored in the cache corresponds to the size of the cache.
For example, if the size of the cache is equal to 10, the cache will be filled 3 times when running a query that selects 24 records:
  • 10 records.
  • 10 records.
  • 4 records.
Example
// Modify the size of the cache for the Native MySQL Access used by MyConnection
MyConnection..CtCacheSize = 450
Syntax

Finding out the size of the cache for the Native MySQL Access Hide the details

<Cache size> = <Connection name>..CtCacheSize
<Cache size>: Integer
Size of the cache for the Native MySQL Access.
If this parameter corresponds to:
  • -2: the size of the cache is the default size (100 for the Native MySQL Access).
  • -1: the size of cache is unlimited.
  • 0: the cache stores no record. No record is retrieved.
<Connection name>: Character string (with or without quotes)
Name of connection used. This name was defined in the data model editor, or by HDescribeConnection or HOpenConnection.

Modifying the size of the cache for the Native MySQL Access Hide the details

<Connection name>..CtCacheSize = <Cache size>
<Connection name>: Character string (with or without quotes)
Name of connection used. This name was defined in the data model editor, or by HDescribeConnection or HOpenConnection.
<Cache size>: Integer
New size of the cache for the Native MySQL Access.
If this parameter corresponds to:
  • -2: the size of the cache will be the default size (100 for the Native MySQL Access).
  • -1: the size of the cache will be unlimited.
  • 0: the cache will store no record. No record will be retrieved.
Remarks

Retrieving the records

The speed at which the entire set of records is retrieved is proportional to the size of the cache: the larger the cache size, the faster the records are retrieved.
However, the smaller the cache size, the faster the first record will be read.
Caution: The memory used by the cache is proportional to the size of the cache.

Managing the ..CtCacheSize property

..CtCacheSize is supported by the Native MySQL Access.
The other Native Accesses do not support ..CtCacheSize. In this case, the use of this property will be ignored and no error will be generated.

hQueryWithoutCorrection constant

If the query is run and no check is performed on the SQL code (hQueryWithoutCorrection constant), the cache size will be unlimited and it cannot be modified by ..CtCacheSize.
See also
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment