|
|
|
|
|
- Overview
- Main remarks
- Required versions
- Using WLanguage commands in SQL queries
- Limitations of MariaDB version 3.23x
- Managing large data files
- INSERT queries and automatic identifier
- Creating a table with HCreation
- Support for Unicode
- Connection with SSL certificates
- General requirements
- Locking records
- Identical records
- Transactions
- SET or ENUM items
- xBlob items
- Array items
- Using INSERT/UPDATE queries to insert text into a LONGBLOB item (binary memo) on MariaDB
- Partial indexing of memos and full-text indexing
- Specific requirements for HFSQL and SQL functions
MariaDB Native Connector: Features and notes
Available only with this kind of connection
This page presents the main aspects and requirements of the Native MariaDB Connector. Required versions Please note: This version of the MariaDB Native Connector works only with:
- WINDEV or WEBDEV 2025.
- MariaDB client library (libmariadb.DLL file)
- 32-bit client library to use the 32-bit Native MariaDB Connector (version 3.x.x to 10.x.x tested).
- 64-bit client library to use the 64-bit Native MariaDB Connector (version 10.x.x tested).
- The LibMariaDB.DLL DLL must be:
- On the development computer:
- in the "\Programs\Framework\Win32x86" directory of the installation directory of WINDEV or WEBDEV (32-bit).
- in the "\Programs\Framework\Win64x86" directory of the installation directory of WINDEV or WEBDEV (64-bit).
- On the deployment computer, in the executable directory or in the Windows directory. For a deployment on a Web server, the DLL must be found in the directory of the Native Connector or in the Windows directory.
Using WLanguage commands in SQL queries WLanguage commands cannot be used in SQL queries. Limitations of MariaDB version 3.23x The MariaDB database version 3.23x does not support: - the Partial Fetch. The use of Partial Fetch with the SQL functions of WLanguage has the same effect as if no Partial Fetch was used.
- the Unions.
Managing large data files When handling large data files, all records are loaded into memory. To reduce memory usage, it is recommended to: - apply a filter (using HFilter) before starting a read operation (with HReadFirst/HReadLast, etc.).
- use queries whose selection conditions are selective enough.
- avoid performing searches.
INSERT queries and automatic identifier INSERT queries (created programmatically or using the query editor) do not support automatic identifiers. To use an automatic identifier, call HAdd on the table. Creating a table with HCreation Support for Unicode When Unicode is supported on the connection (default mode), the text items of the queries run with the hQueryWithoutCorrection constant are in Unicode format. If a Unicode string is assigned to an Ansi string, the conversion is automatically performed by WINDEV and WEBDEV by using the character set defined with ChangeCharset. If the connection is ANSI ("WD Unicode Support = 0" in the extended information specified by HDescribeConnection or HOpenConnection), the text items of the queries run with the hQueryWithoutCorrection constant are in ANSI format. Connection with SSL certificates To establish a connection with SSL certificate, you must: - Install a version of the MariaDB server that supports the SSL connections. For more details, see the MariaDB documentation.
- Create the necessary certificates.
- Establish a connection by using the following keywords in the advanced information of the connection:
| | Keyword | Use |
---|
SSL Key | Path of key file. | SSL Cert | Path of certificate file. | SSL CA | Path of certification authority file. | SSL CAPath | Path of the directory containing the certificates of the recognized SLL certification authorities, in PEM format. | SSL Cipher | List of authorized ciphers. |
Example of SSL connection on the CRM database of the mariadbserver.domain.fr server: MyConnection is Connection
MyConnection.User = "root"
MyConnection.Password = "secret"
MyConnection.Server = "mariadbserver.domain.fr"
MyConnection.Database = "CRM"
MyConnection.Provider = hNativeAccessMariaDB
MyConnection.Access = hOReadWrite
MyConnection.ExtendedInfo = [
SSL KEY = E:\MySSLCertificates\mariadb.key;
SSL CERT = E:\MySSLCertificates\mariadb_cert.pem;
SSL CA = E:\MySSLCertificates\ca-cert.pem;
SSL CAPATH = E:\MySSLCertificates\CA\
]
HOpenConnection(MyConnection)
Note These parameters correspond to those of the mysql_ssl_set function in the MariaDB C API. Locking records The lock options (hLockWrite and hLockReadWrite constants) that can be used with HFSQL functions are not supported in this version. Identical records The Native MariaDB Connector cannot differentiate between two identical records (which means with identical values for all items, excluding memo items). When a record is modified or deleted, all the identical records will be modified or deleted. Transactions To manage the transactions, you must use a type of MariaDB table that supports the BEGIN, COMMIT and ROLLBACK commands. SET or ENUM items The SET and ENUM items are automatically processed and imported as text memo in WINDEV and WEBDEV. Indeed, the SET and ENUM items have no equivalence in HFSQL. They contain numeric values (indexes) that correspond to "text" values. These are the "text" values that are imported. xBlob items The xBlob items in MariaDB are automatically processed and imported as text memo in WINDEV and WEBDEV: - the BLOB items are imported as binary memo items.
- the LONGTEXT items are imported as text memo items.
Array items The array items are not supported by the Native Connector. If you are using an array item, only the value of index 1 in the array will be handled by HFSQL functions (read/write). Using INSERT/UPDATE queries to insert text into a LONGBLOB item (binary memo) on MariaDB To enable management of Unicode fields, MariaDB Native Connector connections are opened in UTF8: all requests and data are exchanged with the server in UTF8. The server converts the request and values into the character set corresponding to each column, except in the case of a LONGBLOB (binary memo): in this case, the value is inserted as is. For a LONGBLOB item: - if the connection is in ANSI format, the inserted text value is in ANSI format.
- if the connection is in UTF8 format, the inserted text value is in UTF8 format; in this case, a compatibility problem may occur.
To avoid this conversion problem in UTF8, you can: Partial indexing of memos and full-text indexing The partial indexing of memos as well as the full-text indexing are not taken into account: - when importing MariaDB tables into the analysis.
- when HCreation is used.
If these features are defined in the analysis, they will be taken into account when running the SQL queries (with the hQueryWithoutCorrection constant) that use the SQL "CREATE TABLE" and "MATCH AGAINST" functions. Specific requirements for HFSQL and SQL functions Bear in mind the following particularities when using HFSQL and SQL functions with the Native MariaDB Connector: | | Specific requirements | Affected functions |
---|
Multi-file query: HAdd, HModify and HDelete are not supported. | HAdd HModify HDelete | The searches performed on some complex queries with HReadSeek* may fail in this version. This problem will be fixed in a forthcoming version. | HReadSeek, HReadSeekFirst, HReadSeekLast | When using Native MariaDB Connector, you must specify the "DataBase" used. If you are using HConnect, the "DataBase" must be specified in the additional information as follows: "initial catalog = DataBaseName" | HConnect | When creating tables with the HCreationfunction, table names must not contain accents (e.g. "AccentedFile").. This is a problem specific to MariaDB (checked on versions 3.23.52-max-nt and 3.23.47-max-nt of the MariaDB server). Running the SQL "DROP TABLE" command, performed by HCreation to delete the table if it already exists, may cause an unexpected stop of the MariaDB server. For more details, see MariaDB Native Connector: Special features. | HCreation |
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|