PDA

View Full Version : QPSQL driver not loaded



drave
15th April 2010, 20:02
what do i have to do to use these FFFFFing Postgresql drivers

i followed the instructions on building the driver
they are now in %QTDIR%\plugins\sqldrivers

but all i get is

>>QSqlDatabase: QPSQL driver not loaded
>>QSqlDatabase: available drivers: QSQLITE QODBC3 QODBC

gggrrrrrrr

windows 7 64 bit
latest postgresql
qt 2010.02.01

Lesiok
16th April 2010, 06:28
Did You have PostgreSQLdir\bin in PATH ?

drave
16th April 2010, 11:07
ive had to take a step back at the moment

one of the solutions in another thread recommended rebuilding qt, after which nothing worked so i'm re-installing then using mysql

thanks anyway

sadjoker
16th April 2010, 12:12
For the next:
get all the DLL files from PSQL bin dir to your software`s dir.
get the qsqlpsql4.dll file, make a dir name sqldrivers in the directory where your executable resides and put it there...

the thing should work now.

BUT once i had a problem on computers with WINXP and QSQLITE driver... everything was working on other computers but only on these it couldn`t... i was using 4.6.2 driver. When i put 4.4.0 qsqlite driver.. things worked on that PCs. Very weird situation. 4.6.2 driver worked on many computers but it couldn`t load on those specific configurations and i did everything by the playbook... i distributed a lot of Qt software and know what to put so it works on any machine. Also i tried to compile the driver in the QSql dll... or as a plugin.. nothing worked. As a last resort i changed the drivers version and magically it worked. Some day i should play with the QSQLITE driver`s source and see whats changed...

diplonics
4th May 2010, 13:11
Can I restart this topic as I need to use PostGIS, so the QPSQL driver is a must. Anyway, I've the same set-up as the thread starter drave, and the exact same problems (!!and to be quite honest the same sentiments at the whole set-up at the moment, I just want to throw the whole lot out the window and go back to a C# VS2005 set-up with Npgsql.net provider which worked perfect for me on another project!!!). I would say I've been through all possible solutions that can be found on the forums or google, but I wonder if any of them actually apply to a Windows 7 64 bit set-up. Is there a link/post to a definitive set of requirements/steps to getting PostgreSQl working with QT on this OS platform? Has anybody got it working on this platform and if so I would greatly appreciate you sharing how you manged it?

Anyway, I'm at the point where I have qsqlpsql4.dll and qsqlpsqld4.dll. If I run dependency walker on qsqlpsql4.dll I am missing a GPSVC.dll module, yet its there in system32 dir, yet if I try and point/use it dependency walker complains that its 64bit and QPSQL still won't load. The dependency walker output problems are summarised here:

********************************| Module List |*********************************
*
* Legend: D Delay Load Module ? Missing Module 6 64-bit Module
* * Dynamic Module ! Invalid Module
* E Import/Export Mismatch or Load Failure
*
************************************************** ******************************

Module Load Order
----- ---------------------------------------------------------------------------------------------------------------------------
[D? ] GPSVC.DLL Error opening file. The system cannot find the file specified (2).
[ E ] c:\program files (x86)\mendeley desktop\QTCORE4.DLL Not Loaded
[ E ] c:\program files (x86)\mendeley desktop\QTSQL4.DLL Not Loaded
[ ] c:\windows\system32\SHLWAPI.DLL Not Loaded
[ E ] c:\windows\system32\SSLEAY32.DLL Not Loaded
[DE ] c:\windows\system32\IEFRAME.DLL



If I run dependency walker on qsqlpsqld4.dll I am also missing the GPSVC.dll module here. The dependency walker output problems are summarised here:

********************************| Module List |*********************************
* *
* Legend: D Delay Load Module ? Missing Module 6 64-bit Module *
* * Dynamic Module ! Invalid Module *
* E Import/Export Mismatch or Load Failure *
* *
************************************************** ******************************

Module Load Order
----- ---------------------------------------------------------------------------------------------------------------------------
[D? ] GPSVC.DLL Error opening file. The system cannot find the file specified (2).
[ ] c:\windows\system32\SHLWAPI.DLL Not Loaded
[ E ] c:\windows\system32\SSLEAY32.DLL Not Loaded
[DE ] c:\windows\system32\IEFRAME.DLL

So if anyone has any helpful information it would be much apprciated, thanks in advance.