PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

  • Equivalence
  • Retrieving the records
  • Managing the CacheSize property
  • hQueryWithoutCorrection constant
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
CacheSize (Property)
In french: TailleCache
OLE DBNative Connectors (Native Accesses)Available only with these kinds of connection
The CacheSize property is used to:
  • Get the maximum number of records that can be stored in the cache of the Native MySQL Connector.
  • Change the maximum number of records that can be stored in the cache of the Native MySQL Connector. In this case, if the connection is currently opened, it will be closed and reopened with the new parameters during the first access to a file that uses this connection.
Remark: The connection can correspond to:
Example
WINDEVWEBDEV - Server codeAjaxOLE DBNative Connectors (Native Accesses)
// Change the cache size of the Native MySQL Connector used by
// MyConnection
MyConnection.CacheSize = 450
Syntax

Getting the cache size for a connection Hide the details

<Cache size> = <Connection used>.CacheSize
<Cache size>: Integer
Cache size of the Native MySQL Connector.
If this parameter corresponds to:
  • -2: the cache size is the default size (100 for the Native MySQL Connector).
  • -1: the cache size is unlimited.
  • 0: the cache stores no record. No record is retrieved.
<Connection used>: Character string or Connection variable
Name of the connection used. This name was defined:

Defining the cache size for a connection Hide the details

<Connection used>.CacheSize = <Cache size>
<Connection used>: Character string or Connection variable
Name of the connection used. This name was defined:
<Cache size>: Integer
New cache size of the Native MySQL Connector.
If this parameter corresponds to:
  • -2: the cache size will be the default size (100 for the Native MySQL Connector).
  • -1: the cache size will be unlimited.
  • 0: the cache will store no record. No record will be retrieved.
Remarks

Equivalence

CtCacheSize is used to define the cache size for a MySQL connection. This property is kept for backward compatibility. It is recommended to use the CacheSize property.

Retrieving the records

The speed at which the entire set of records is retrieved is proportional to the cache size: 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 cache size.
WINDEVWEBDEV - Server codeReports and QueriesAjaxOLE DBNative Connectors (Native Accesses)

Managing the CacheSize property

The CacheSize property is supported only by the Native MySQL Connector.
Other Native Connectors do not support the CacheSize property. In this case, the use of this property will be ignored and no error will be generated.

hQueryWithoutCorrection constant

If the query is run while no check is performed on the SQL code (hQueryWithoutCorrection constant): the size is unlimited and cannot be changed with the CacheSize property.
See also
Minimum version required
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment