Postgres, "driver not load" in debug mode
Hello.
I'm having trouble connecting to the PostgreSQL database in debug mode. When connecting to a database in debug mode I get the error "driver not load." In relase mode, the program works as expected. The error occurs in the default installation Qt for visual 2008.
So i compiled the plugin by http://doc.qt.nokia.com/4.7/sql-driver.html#qpsql but then I get the error "driver not load" in debug mode and relase. Anyone knows how to work with postgres in debug mode?
I'm using PostgreSQL 8.4.5, the compiler VC9 (Visual 2008), and Win 7 and XP.
System Paths are set correctly.
c:\Qt\Qt4.7.0\ bin
c:\Postgres\8.4\ lib
QTDIR=c:\Qt\Qt4.7.0
Thanks, for reply.
Regards
Re: Postgres, "driver not load" in debug mode
You need a plugin for handling postgresql in Qt built in debug mode.
Re: Postgres, "driver not load" in debug mode
I have added to the configuration CONFIG+= debug. After compiling qsqlpsqld.dll plugin is created in C:\qt\4.7.0.\plugins\sqldrivers\ but is strangely small - 67 KB. Version of qt is 223kB. Unfortunately the error still occurs.
Re: Postgres, "driver not load" in debug mode
You probably built it with different options (or a different compiler) than your Qt installation is using. You can use the Dependency Walker to check dependencies of the plugin.
Re: Postgres, "driver not load" in debug mode
The solution was simple.
Just copy the dll files from postgres bin directory to qt bin directory or add to system paths postgres bin directory and recompile plugin.
The solution comes from the polish forum qt www.devqt.pl
Re: Postgres, "driver not load" in debug mode
Thanks so much!! That did the trick for me!!