The HDBC-odbc package

[Tags:bsd3, library]

This package provides an ODBC database backend for HDBC. It is cross-platform and supports unixODBC on UnixLinuxPOSIX platforms and Microsoft ODBC on Windows. It is also the preferred way to access MySQL databases from Haskell.

[Skip to Readme]


Dependencies base (>= && <5), bytestring, containers, convertible, HDBC (>=2.1.0), HUnit, mtl, old-locale, old-time, QuickCheck, testpack, time (>=, utf8-string [details]
License BSD3
Copyright Copyright (c) 2005-2011 John Goerzen
Author John Goerzen
Maintainer Nicolas Wu <>
Category Database
Home page
Uploaded Tue Aug 9 21:17:04 UTC 2011 by JohnGoerzen
Distributions Debian:, NixOS:
Downloads 7697 total (54 in the last 30 days)
0 []
Status Docs not available [build log]
Last success reported on 2016-12-27 [all 8 reports]


  • Database
    • HDBC
      • Database.HDBC.ODBC


buildtestsBuild the executable to run unit testsDisabledAutomatic

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info


Maintainer's Corner

For package maintainers and hackage trustees

Readme for HDBC-odbc

Readme for HDBC-odbc-

Welcome to HDBC, Haskell Database Connectivity.

This package provides a database backend driver for ODBC.  You should
be able to use any ODBC front-end with it.

Please see HDBC itself for documentation on use.

This package provides one function in module Database.HDBC.ODBC:

{- | Connect to an ODBC server.

For information on the meaning of the passed string, please see:


An example string is:


connectODBC :: String -> IO Connection


None known at this time.


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.