Hi,

I have been using qt 4.2.2, mingw, and mysql 5.0 for some time with no problems. Recently I tried upgrading to qt 4.3.1 and now mysql is no longer functioning properly. I followed the steps below and everything seemed to go fine. No errors and I have the qsqlmysql4.dll and libqsqlmysql4.a files in my qt/4.3.1/plugins/sqldrivers directory as expected.

My code builds without any errors but the problem is than now when I execute it, a message box pops up immediately saying:

"The procedure entry point mysql_affected_rows@4 could not be located
in the dynamic link library libmysql.dll"

I've never seen this message before and I'm not sure what is causing it now. Nothing has changed as far as mysql is concerned. I've tried rebuilding (successfully) from scatch but the same thing happens everytime. I'm not sure what I am doing wrong and any help would be appreciated.

thanx,

tim



************************************************** *********

Open a Qt Command Prompt and go to wherever you installed the MySQL server (C:\Program Files\MySQL\MySQL Server 5.0 is the default location).

Goto the sub-directory lib/opt and run reimp libmysql.lib to produce the liblibmysql.a file. This is the import library to use with MinGW.

Go to %QTDIR%/src/plugins/sqldrivers/mysql.
Run the following command: qmake -o Makefile "INCLUDEPATH+=C:\Progra~1\MySQL\MySQLS~1.0\include " "LIBS+=C:\Progra~1\MySQL\MySQLS~1.0\lib\opt\liblib mysql.a"
mysql.pro

Run make - this should build the qsqlmysql.dll and libqsqlmysql.a files in the %QTDIR%/plugins/sqldrivers directory.

Copy the libmysql.dll file from the MySQL installation's bin directory to a directory in %PATH% (e.g. %QTDIR%/bin).

Now the plug-in should load properly. You may have to empty the plug-in cache before everything works though.

************************************************** *******