ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / Native Connectors/Native Accesses / Native MariaDB Connector
  • Overview
  • Use
  • Use case
  • Looping through tables (data files)
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
MariaDB Native Connector: Special features
Native Connectors (Native Accesses)Available only with this kind of connection
Overview
The Native MariaDB Connector creates "InnoDB" tables to support locks and transactions on a MariaDB database.
See the MariaDB documentation for more details on this type of table.
Use

Use case

If your server is not configured to support "InnoDB" tables, MariaDB automatically creates an ISAM table (default type in MariaDB). Refer to the MariaDB documentation to learn more more about the server configuration required to support "InnoDB" tables.
MariaDB Native Connector: Functions SQLLock and SQLTransaction are used to manage blocks and transactions only on MariaDB tables of type "InnoDB".
If you want to specify another type of table (other than "InnoDB"):
  • run the CREATE TABLE SQL command
  • use the MariaDB management tool. In this case, do not use HCreation in your program. HCreation deletes the table ("DROP TABLE" command) if it already exists in order to recreate it.

Looping through tables (data files)

When looping through a MariaDB table, the records are not retrieved all at once but by blocks of 100 records. This value corresponds to a read "cache". This feature optimizes read operations started with HReadFirst/HReadNext as well as with the HReadSeekXXX functions.
Note: Records identical to the last read record (i.e. with identical values in all fields) will not be selected by the read cache fill request for the following records.
Example: In the MariaDB table "MaTable", the following records are present:
Record numberValue
......
98Tata
99Toto
100Toto
101Toto
102Tutu

The code is as follows:
FOR EACH MyFile
	Trace(MyFile.Valeur)
END
The trace window will display the following values:
  • Tata
  • Toto
  • Toto
  • Tutu
One record is absent (Record #101 whose value is "Toto").
Minimum version required
  • Version 20
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/21/2024

Send a report | Local help