Hi guys,
I had a big fight just know for many hours with DB2 from IBM.
I don't know why, but there are not so many infomations in the net about Qt and DB2.
I got it working after this forum gave me a few ideas, so I like to share my knowledge about installing IBM's DB2, under Linux:
Unpack the package db2exc_xxx_LNX_x86.tar.gz to a temp-folder.
Then don't run db2setup like it's written in the readmefirst.txt. Run db2_install instead.
This will install the database including the development-files under /opt/ibm and that's fine.
Set DB2DIR with 'export DB2DIR=/opt/ibm/db2/V9.7' and QTDIR with 'export QTDIR=/usr/local/Trolltech/Qt-4.5.3' or something like this.
Now create your driver like it's written in Qt-Assistent with:
cd $QTDIR/src/plugins/sqldrivers/db2
qmake "INCLUDEPATH+=$DB2DIR/include" "LIBS+=-L$DB2DIR/lib -ldb2"
make
make install
And now copy - or may be a symlink will do the job for you - /opt/ibm/db2/V9.7/lib32/libdb2.so.1 to a location, where you application can find it. Now run ldconfig (only to make sure) and start your application.
Now QDB2 should be in the list of available drivers.
Good Luck!!
Bookmarks