Results 1 to 2 of 2

Thread: Database connection problem

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Thanks
    111
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Database connection problem

    Hi to all!

    I've upgraded to 4.4.1 and my app cannot start because of following error:
    Qt Code:
    1. warning: QSqlDatabase: QMYSQL driver not loaded
    2. warning: QSqlDatabase: available drivers: QSQLITE QMYSQL3 QMYSQL QODBC3 QODBC
    To copy to clipboard, switch view to plain text mode 

    I've compiled mysql plugin and copied it to all places where is needed (libmysql*.dll) but it still does not work. Any help please?
    Qt 5.3 Opensource & Creator 3.1.2

  2. #2

    Default Re: Database connection problem

    You have a static Qt library?

    Then add the following macro to your cpp file:

    Q_IMPORT_PLUGIN(qsqlmysql)

    and in your .pro file:

    QTPLUGIN += qmysql

Similar Threads

  1. Threads and database connection
    By probine in forum Qt Programming
    Replies: 9
    Last Post: 7th August 2013, 08:30
  2. DB Connection Problem
    By ktmdwn in forum Qt Programming
    Replies: 13
    Last Post: 4th August 2010, 15:12
  3. Multiple database connections
    By cyberboy in forum Qt Programming
    Replies: 3
    Last Post: 30th March 2008, 16:56
  4. Client/Server Error: BadIDChoice
    By 3nc31 in forum Qt Programming
    Replies: 5
    Last Post: 27th November 2007, 10:22
  5. [QMYSQL] connection problem
    By chaos_theory in forum Installation and Deployment
    Replies: 5
    Last Post: 2nd July 2007, 09:52

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.