Results 1 to 2 of 2

Thread: MySql driver problem

  1. #1
    Join Date
    Apr 2010
    Posts
    8
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default MySql driver problem

    Hello,
    I've a problem with MySql database driver.
    My Qt version is 4.5.2 Commercial and my OS is Windows 7 Ultimate Ed.

    First of all I want to say that I already completed the procedure to build MySql plugin manually as reported in Qt Documentation. In fact now I can see qsqlmysql4.dll and qsqlmysqld4.dll libraries in $(QTDIR)\plugins\sqldrivers folder.

    My problem is I m not able to load MySql driver only in release version.
    If I try to load the libraries manually through the command
    Qt Code:
    1. QLibrary mysqlLib("qsqlmysql4");
    2.  
    3. int ret = mysqlLib.load();
    To copy to clipboard, switch view to plain text mode 
    The value of varibale ret is 1 as I expected. Both in release and debug version.

    After doing it, if I try to control if the driver is available like that:
    Qt Code:
    1. if (QSqlDatabase::isDriverAvailable ("QMYSQL") == false)
    2. {
    3. box.setText("Error: driver QMYSQL not available\n");
    4. box.exec();
    5. }
    To copy to clipboard, switch view to plain text mode 

    I got the Message Box with the Error message only in release mode.
    I don't understand why.
    Somebody can help me?

    Thank you

  2. #2
    Join Date
    Apr 2010
    Posts
    15
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: MySql driver problem

    Put libmysql.dll into the folder Release

  3. The following user says thank you to aliks-os for this useful post:

    stilgar (15th June 2010)

Similar Threads

  1. MySQL driver - Very strange problem. PLEASE HELP ME. Thanks.
    By diego in forum General Programming
    Replies: 15
    Last Post: 3rd March 2011, 01:33
  2. Replies: 7
    Last Post: 13th August 2009, 16:11
  3. Qt mysql driver installation problem
    By alphajoseph in forum Installation and Deployment
    Replies: 1
    Last Post: 8th February 2009, 11:56
  4. Qt4 and mysql(driver problem)
    By knut in forum Installation and Deployment
    Replies: 20
    Last Post: 27th December 2007, 14:47
  5. My Mysql 5 and Qt 4.2.2 Problem (Driver not loaded)
    By fengtian.we in forum Qt Programming
    Replies: 4
    Last Post: 9th February 2007, 08:11

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.