ODBC Driver Manager
The ODBC driver manager is the interface between an ODBC application (DBD::ODBC in this case) and the ODBC driver. The driver manager principally provides the ODBC API so ODBC applications may link with a single shared object (or dll) and be able to talk to a range of ODBC drivers. At run time the application provides a connection string which defines the ODBC data source it wants to connect to and this in turn defines the ODBC driver which will handle this data source. The driver manager loads the requested ODBC driver and passes all ODBC API calls on to the driver. In this way, an ODBC application can be built and distributed without knowing which ODBC driver it will be using.
However, this is a rather simplistic description of what the driver manager does. The ODBC driver manager also:
* Controls a repository of installed ODBC drivers (on UNIX this is the file odbcinst.ini).
* Controls a repository of defined ODBC data sources (on UNIX these are the files odbc.ini and .odbc.ini).
* Provides the ODBC driver APIs (SQLGetPrivateProfileString and SQLWritePrivateProfileString) to read and write ODBC data source attributes.
* Handles ConfigDSN which the driver exports to configure data sources.
* Provides APIs to install and uninstall drivers (SQLInstallDriver).
* Maps ODBC versions e.g. so an ODBC 2.0 application can work with an ODBC 3.0 driver and vice versa.
* Maps ODBC states between different versions of ODBC.
* Provides a cursor library for drivers which only support forward-only cursors.
* Provides SQLDataSources and SQLDrivers so an application can find out what ODBC drivers are installed and what ODBC data sources are defined.
* Provides an ODBC administrator which driver writers can use to install ODBC drivers and users can use to define ODBC data sources.
The ODBC Driver Manager is the piece of software which interacts with the drivers for the application. It “hides” some of the differences between the drivers (i.e. if a function call is not supported by a driver, it ‘hides’ that and informs the application that the call is not supported. DBD::ODBC needs this to talk to drivers.
Under Win32, you usually get the ODBC Driver Manager as part of the OS.