[ bsd3, database, library ] [ Propose Tags ]


  • Database
    • HDBC
      • Database.HDBC.ODBC


Maintainer's Corner

For package maintainers and hackage trustees


Versions [RSS],,,,,,,,,,,,,,,,,,,,,,
Dependencies base, HDBC (>=1.0.0), mtl, parsec [details]
License LicenseRef-LGPL
Copyright Copyright (c) 2005-2006 John Goerzen
Maintainer John Goerzen <jgoerzen@complete.org>
Uploaded by IsaacJones at 2006-09-24T19:15:00Z
Distributions Debian:, NixOS:
Downloads 23869 total (112 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2016-11-11 [all 8 reports]

Readme for HDBC-odbc-

[back to package description]
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.  If you don't already
have it, you can browse this documentation at

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.


Before installing this package, you'll need to have HDBC 0.99.2 or
above installed.  You can download HDBC from

You'll need either GHC 6.4.1 or above, or Hugs 2005xx or above.  If
you're using Hugs, you'll also need cpphs (see
http://www.cs.york.ac.uk/fp/cpphs/ if you don't already have it).


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.

-- John Goerzen
   January 2006