Updated on 2025-10-23 GMT+08:00

Development Based on ODBC

ODBC is a Microsoft API for accessing databases based on the X/OPEN CLI. It provides a unified method for applications to access various database management systems (DBMSs) without considering specific database types or OS platforms. ODBC allows applications to use SQL to query, insert, update, and delete data in a database. Applications interact with the database through the APIs provided by ODBC, which enhances their portability, scalability, and maintainability.

M-compatible databases can be developed based on GaussDB ODBC. For details, see "Application Development > Development Based on ODBC" in Developer Guide. Some functions of M-compatible databases are different from those of GaussDB.

Restrictions on connecting GaussDB ODBC to M-compatible databases:

  • When a database connection is created, the UseDeclareFetch parameter is not supported.
  • When the GUC parameter m_err_sql_dialect is set to "MySQL", you can enable error code replacement to replace the error codes and SQLSTATE values of GaussDB Kernel with those supported by M-compatible databases.