DEV Community

Franz
Franz

Posted on

πŸ”Œ MySQL Connector in Uniface 10.4: A Developer's Guide

Note: This blog post was created with AI assistance and is based on the official Uniface 10.4 documentation for the MySQL connector.

Introduction: Why MySQL Integration Matters for Uniface Developers

If you're working with Uniface 10.4, you're likely maintaining enterprise applications built with this powerful low-code platform. MySQL has become one of the most popular open-source relational database management systems, offering cost-effective data storage and compatibility with modern cloud platforms.

Whether you're integrating with existing MySQL databases, modernizing legacy systems, or building new functionality, understanding the MySQL connector in Uniface is essential. This guide covers the core features, installation requirements, and practical setup based on official documentation.

What is the MySQL Connector in Uniface?

The MySQL DBMS connector is a database driver that enables Uniface applications to interact with MySQL database servers. It provides a bridge between Uniface's data model and MySQL's relational database structure.

Key Connector Information

Aspect Details
Connector Mnemonic MQL
SQL Support βœ… Supported
Stored Procedures Support βœ… Supported
Create Table Utility βœ… Supported
Load Definitions Utility βœ… Supported
Create Scripts Utility ❌ Not Supported

Understanding the Utilities

  • Create Table: Allows you to generate MySQL tables directly from Uniface entity definitions in your application model
  • Load Definitions: Enables reverse engineeringβ€”importing existing MySQL table structures into Uniface entities
  • Create Scripts: Cannot generate standalone SQL script files (use alternative methods if needed)

Platform and Version Support

The MySQL connector is available for Uniface 10.4 across multiple supported platforms. For the complete list of supported platforms and MySQL versions, consult the official Platform Availability Matrix.

Installation: The Critical Setup Steps βš™οΈ

The MySQL connector requires proper configuration to function. Here's what you need to know:

Requirement: libmysql.dll

To use the MySQL connector in Uniface, you must copy libmysql.dll from your MySQL installation to your Uniface installation.

Essential Step:

  1. Locate libmysql.dll in your MySQL Connector/C installation folder
  2. Copy it to: <Uniface Installation>\common\bin\

⚠️ The 32-bit vs. 64-bit Compatibility Issue

This is critical: The 32-bit and 64-bit versions of libmysql.dll are not binary compatible.

You must ensure:

  • If running 32-bit Uniface β†’ copy the 32-bit libmysql.dll
  • If running 64-bit Uniface β†’ copy the 64-bit libmysql.dll

Using the wrong architecture will result in library loading errors. Always verify which version of Uniface you're running before copying the DLL.

Configuring the MySQL Connector in Uniface

Configuration is handled through Uniface's assignment files (.asn files). The specific syntax and options depend on your Uniface configuration.

Basic Setup Process

  1. Open your assignment file in the Uniface IDE or text editor
  2. Define the logical database path with the MQL mnemonic
  3. Configure connection parameters (hostname, database name, credentials)
  4. Test the connection before deploying

For detailed configuration options and parameters specific to your environment, refer to the official Uniface 10.4 documentation on database connector configuration.

Supported Features in Detail

SQL Support

The MySQL connector supports SQL statements, allowing you to execute queries directly from Uniface applications.

Stored Procedures

MySQL stored procedures are fully supported. You can call existing stored procedures from Uniface and handle their results. This is useful for:

  • Complex business logic encapsulated in the database
  • Performance-critical operations
  • Reusing existing database code

Important consideration: When working with stored procedures, ensure proper error handling on both the Uniface and MySQL sides.

Important Naming Considerations

When using MySQL with Uniface, be aware of naming rules:

  • Uniface requires uppercase names in the application model definition
  • MySQL has reserved words that cannot be used for table or entity names
  • Always check the official documentation for reserved words in your MySQL version

Common Scenarios

Creating Tables from Uniface

Use the Create Table utility when:

  • You're building a new application with a database
  • You want tables generated automatically from your entity model
  • You need consistent naming and structure across entities

Importing Existing Database Structures

Use Load Definitions when:

  • You're integrating with an existing MySQL database
  • You need to reverse-engineer database schema into Uniface entities
  • You're migrating from another system to Uniface

Troubleshooting Tips

Connection Issues

If Uniface cannot load the MySQL connector:

  1. Verify libmysql.dll is in <Uniface>\common\bin\
  2. Check that the DLL architecture matches your Uniface installation (32-bit or 64-bit)
  3. Ensure all required files are properly copied
  4. Verify database connectivity settings in your assignment file

Library Loading Errors

Common error messages indicate:

  • Missing libmysql.dll
  • Architecture mismatch (32-bit/64-bit)
  • Missing dependencies

Naming and Reserved Words

If table creation fails:

  • Check for reserved MySQL keywords in your entity names
  • Review naming rules in the Uniface documentation for MySQL
  • Ensure compliance with both Uniface and MySQL naming conventions

U_VERSION Mechanism for Locking

The MySQL connector supports the U_VERSION mechanism, which is recommended for improving locking performance in concurrent environments. Consult the Uniface documentation for implementation details.

Best Practices for MySQL Integration

Configuration Management

  • Store connection credentials securely
  • Use the Platform Availability Matrix to verify version compatibility
  • Test all database operations thoroughly before production deployment

Development Workflow

  1. Design your data model in Uniface first
  2. Generate tables using Create Table utility, or
  3. Import existing schema using Load Definitions
  4. Test SQL statements and stored procedure calls
  5. Deploy with proper configuration management

Using Stored Procedures Effectively

  • Keep procedures focused on specific business logic
  • Document procedure parameters and expected results
  • Handle errors appropriately in both database and Uniface layers
  • Test procedures independently before integration

Referential Integrity

MySQL connector supports referential integrity management. Review the documentation for how to properly implement and maintain referential integrity constraints in your application.

Conclusion

The MySQL connector in Uniface 10.4 provides robust support for integrating MySQL databases with your enterprise applications. Key points to remember:

βœ… Always match the libmysql.dll architecture (32-bit/64-bit) to your Uniface installation
βœ… Use Create Table for forward engineering and Load Definitions for reverse engineering
βœ… MySQL stored procedures are fully supported
βœ… Follow Uniface naming rules and avoid MySQL reserved words
βœ… Consult the Platform Availability Matrix for version compatibility
βœ… Test thoroughly before production deployment

By following these guidelines and referring to the official documentation, you can successfully integrate MySQL with your Uniface 10.4 applications.


Sources and References

  • Uniface 10.4 MySQL Connector Documentation (December 15, 2025)
  • Rocket Software Platform Availability Matrix
  • Rocket Uniface Community Documentation

Have you integrated MySQL with Uniface? What challenges did you encounter? Share your experiences in the comments! πŸ’¬

Top comments (0)