[Qt-interest] Strange problem with QPSQL driver

Marek Bronowicki marek at cyberdeus.pl
Thu Sep 24 13:43:19 CEST 2009


Hello

I have a weird problem with QPSQL driver module.

I have a devel machine running on Vista and of course on my machine 
everything works fine.
I have also a XP machine which will be destination for my software and I 
copied all dlls and directory structure as it should be.
app/*.exe
app/QtCore4.dll
...
app/plugins/sqldrivers/qsqlpsql4.dll
and so on.

When I call ...db.drivers().at(i)... I see QPSQL and QPSQL7 driver as an 
available driver so the qsqlpsql4.dll is successfuly loaded (when I 
remove the lib from path, drivers just dissapear).
But when I do:

QSqlDatabase db = QSqlDatabase::addDatabase("QPSQL");
db.open()

db.lastError().text() says to me "Driver not loaded"

I'm near to get crazy.
Please help me.

Best Regards,
Marek Bronowicki






More information about the Qt-interest-old mailing list