1 Installing MetaHDBC, HDBC and HDBC-odbc

2 Running Test

After installation you can run some tests. They are located in the test directory. But beware, the tests drops tables, creates tables, and other data manipulation both at compile and run -time. So be sure that you do not accidentally destroy valuable data.

Before running the test you will need to install one or more databases management system (DBMSs). You can see the following section for some guidance.

After installing databases you need to:

Setup your data source names in test/DSN.hs

"runhaskell CreateTables.hs" to create database tables. You will need specify which DBMSs you want to create tables for. Use " runhaskell CreateTables.hs help" for guidance.

use "make DBMS/run<some DBMS>" to run the tests for a specific DBMS.

3 Database on Linux

To use MetaHDBC you will need a database. This section describes how to setup various databases for Linux.

You can use the popular open source databases PostgreSQL, MySQL and SQLite with MetaHDBC. They are all likely to be part of your Linux distribution. These databases in conjunction with MetaHDBC will provide you with SQL syntax check and it will give type inference for returned values. However, they will 'not' infer the types of positional parameters, as these databases do not support the ODBC function SQLDescribeParam properly.

For full type inference you can use DB2 or MS SQL Server. But I have not tested the latter and I would therefore encourage users of MS SQL Server to test MetaHDBC.

DB2 Howto will help you install DB2. There are explanations for various flavors of Linux.

Before installing DB2 you should be given this fair warning. When I installed this .deb package, pointed to from the howto, the install script accidentally overwrote a file in /usr/include. This may or may not be true for the other types of packages pointed to from the howto.