HDBC ODBC Driver is the Haskell ODBC backend driver for HDBC.
HDBC ODBC Driver is the Haskell ODBC backend driver for HDBC. This driver has been tested on Windows and on Linux with unixODBC. It should also be compatible with iODBC, though this has not been tested. It should be portable to any platform supported by both Haskell and unixODBC.

This driver is the preferred method of communicating with MySQL from Haskell.


Important note for MySQL users:

Unless you are going to use InnoDB tables, you are strongly encouraged to set

Option = 262144

in your odbc.ini (for Unix users), or to disable transaction support in your DSN setup for Windows users.

If you fail to do this, the MySQL ODBC driver will incorrectly state that it
supports transactions. dbTransactionSupport will incorrectly return True. commit and rollback will then silently fail. This is certainly /NOT/ what you want. It is a bug (or misfeature) in the MySQL driver, not in HDBC.

You should ignore this advice if you are using InnoDB tables.


HDBC 0.99.2 or above
GHC 6.4.1 or above, or Hugs 2005xx or above


The steps to install are:

1) Examine HDBC-odbc.cabal and edit the include-dirs
line to point to your local ODBC installation. 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're on Windows, you can omit the leading "./".


To use with hugs, you'll want to use hugs -98.

To use with GHC, you'll want to use:

-package HDBC -package HDBC-odbc

Or, with Cabal, use:

Build-Depends: HDBC>=0.99.2, HDBC-odbc

This package has been tested with unixODBC.

last updated on:
March 9th, 2007, 15:46 GMT
developed by:
John Goerzen
license type:
LGPL (GNU Lesser General Public License) 
ROOT \ Database \ Database APIs


In a hurry? Add it to your Download Basket!

user rating



Add your review!