The ODBC architecture consists of four components, these are:
Application: performs processing and translates calls to the Trinc-Prolog database classes to ODBC API calls. The prolog application programmer does not need to learn ODBC, just the three classes of the Trinc-Prolog relational database API.
Driver Manager: loads and unloads database drivers on behalf of an application. Processes ODBC function calls or passes them to a driver. The driver manager is also responsible for resolving ODBC version conflicts. Version 3 of the driver manager can communicate with drivers that were written with a lower version of ODBC like version 2.5.
Driver: Processes ODBC function calls, submits SQL requests to a specific data source, and returns results to the application. If necessary, the driver modifies an applications request so that the request conforms to syntax supported by the associated database.
Data source: Consists of the data the user wants to access and its associated operating system, database management system, and network platform (if any) used to access the database.
![]() |
The prolog program talks to the ODBC driver manager by means of the object-oriented classes of Trinc-Prolog, the method calls are translated by Trinc-Prolog to ODBC API function calls for the driver manager. The driver manager controls the various database drivers and each driver controls a single database, also called a datasource.
To administer ODBC datasources there is the Control Panel application 'ODBC Data Sources'. A datasource is a combination of a database or a database file and a driver to access the data. For instance, a Microsoft Access datasource consists of a database consisting of several files (data files, index files, etc.) and the Microsoft Access ODBC driver.
![]() |
With the ODBC database administrator it is possible to create new datasources or configure existing datasources, it is also possible to inspect which database drivers are installed and their versions. For debugging purposes it is possible to turn ODBC function call tracing on, if this is turned on all ODBC function calls are logged with parameter values, results and error codes generated.