[Qt-interest] QDB2 problem
Gillen Daniel
gillen.daniel at gmail.com
Tue Dec 22 17:04:12 CET 2009
Hi list
I have a problem connecting my application to a DB2 database.
I'm using Ubuntu 9.04 amd64 and am running the DB2 Express-C v9.7
version on localhost. As there was no precompiled package for the Qt DB2
driver, I compiled it myself which worked seamless after tweaking the
Makefile a bit in order to find the DB2 libs located in
/opt/ibm/db2/V9.7/lib64.
So far, I've tryed the following, which always fails with
"QDB2Driver::open: Unable to allocate environment Error:".
QSqlDatabase db=QSqlDatabase::addDatabase("QDB2");
db.setHostName("localhost");
db.setUserName("db2inst1");
db.setPassword("***");
db.setDatabaseName("test");
db.open();
Does anyone has an idea on how to work with the QDB2 driver? I did not
find any example code on the net nor any documentation on this :'(
thx in advance
More information about the Qt-interest-old
mailing list