ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage properties / HFSQL properties
  • Equivalence
  • Retrieving the records
  • Managing the CacheSize property
  • hQueryWithoutCorrection constant
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
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, when you open a file that uses an open connection, that connection will be closed and reopened with the new parameters.
Note: The connection can correspond:
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: cache size is the default size (100 for MySQL Native Connector).
  • -1: cache size is unlimited.
  • 0: cache stores no records. No record is retrieved.
<Connection used>: Character string or Connection variable
Name of the connection used. This name is 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 is defined:
<Cache size>: Integer
New cache size of the Native MySQL Connector.
If this parameter corresponds to:
  • -2: cache size will be the default size (100 for MySQL Native Connector).
  • -1: cache size will be unlimited.
  • 0: the cache will not store any records. 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 with which all records are retrieved is proportional to the size of the cache: the larger the cache, the faster the retrieval speed.
However, the smaller the cache size, the faster the first record will be read.
Warning: The memory occupied by the cache is proportional to the size of the cache.
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 executed without checking the SQL code (using the constant hRequêteSansCorrection): the size will be unlimited and cannot be modified thanks to the property CacheSize.
See also
Minimum version required
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 12/06/2024

Send a report | Local help