This article states what drivers can be or are used to connect to MySQL from .NET Framework and .NET applications, and the benefits of each option.
Since GeneXus 17 upgrade 1, when using the .NET Framework generator in the ADO.NET provider property you can choose between these options:
- MySQL Connector
Since GeneXus 17 upgrade 1, when using the .NET generator, MySQL Connector is used. (*)
- Requires the installation of a MySQL Client, with different DLLs depending on the MySQL Version, 32 or 64 bits, etc. This causes issues or troubleshooting costs in different scenarios for development and deployment
- It does not support UTF8 or Emojis
- It has problems related to accessing memory. These are difficult to solve since the driver is not fully managed (interop with c++)
- Supports multiple data readers (Less memory consumption loading recordsets from the database (**))
- Higher memory consumption when loading recordsets from the database (**)
- It is fully managed (It does not require any extra installation)
- It is maintained by a broad and active open source community (Dec 2020)
(*) In previous versions, MySQL.Data provider was used. But given the lack of performance (2:1 compared to MySQL Connector), it is no longer used in GeneXus 17 Upgrade 1 or higher.
(**) The driver does not support multiple server cursors reading data at the same time. Therefore, when you nest reads, all data of the outer cursor has to be read first and loaded to memory, and then the nested cursor can start executing. More information at Performance and memory implications depending Drivers support for multiple data readers.