HDBC ODBC Driver is a software that allows Haskell-based database applications to connect with an ODBC backend by serving as a driver for the HDBC.
With this driver, communication with MySQL from Haskell is much more straightforward. However, it is important to note that if InnoDB tables are not being used, MySQL users are advised to set "Option = 262144" in odbc.ini for Unix users or disable transaction support in their DSN setup for Windows users. Failing to do so will result in the incorrect statement that the MySQL ODBC driver supports transactions, rendering committing and rollback functions ineffective. It is important to know that HDBC is not at fault for this; rather, it is an issue with the MySQL driver.
The requirements for using HDBC ODBC Driver includes HDBC 0.99.2 or above, GHC 6.4.1 or above, or Hugs 2005xx or above. Installation is pretty straightforward as well. Simply follow these steps:
1. Examine HDBC-odbc.cabal and make all necessary changes to the include-dirs line to point to the ODBC installation on your computer. Also, if necessary, uncomment and edit the extra-lib-dirs line to point to your local ODBC installation.
2. ghc --make -o setup Setup.lhs
3. ./setup configure
4. ./setup build
5. ./setup install (as root)
If you are using Windows, you can skip the leading "./."
For usage, users can utilize hugs -98 to use with hugs or use "-package HDBC -package HDBC-odbc" with GHC. Otherwise, use "Build-Depends: HDBC>=0.99.2, HDBC-odbc" with Cabal. Finally, it is reassuring to note that this package has been tested with unixODBC, so users can rest assured of its reliability.
Version 1.0.1.1: N/A