Results 1 to 6 of 6

Thread: Postgres, "driver not load" in debug mode

  1. #1
    Join Date
    Nov 2009
    Location
    Częstochowa, Poland
    Posts
    6
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default 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

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Postgres, "driver not load" in debug mode

    You need a plugin for handling postgresql in Qt built in debug mode.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Nov 2009
    Location
    Częstochowa, Poland
    Posts
    6
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default 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.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default 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.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Nov 2009
    Location
    Częstochowa, Poland
    Posts
    6
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default 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

  6. #6
    Join Date
    Mar 2011
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Wink Re: Postgres, "driver not load" in debug mode

    Thanks so much!! That did the trick for me!!

Similar Threads

  1. Replies: 1
    Last Post: 24th April 2010, 04:43
  2. Replies: 3
    Last Post: 15th February 2010, 18:27
  3. Replies: 3
    Last Post: 29th August 2009, 23:24
  4. Replies: 1
    Last Post: 8th January 2009, 14:36
  5. "Debug Assertion failed" in debug mode
    By hed in forum Qt Programming
    Replies: 10
    Last Post: 4th February 2008, 13:10

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.