-
MySQL driver , I have, it still not loaded
Hi,
I make MySQL driver , I have in :
Code:
C:\Qt\2009.02\bin\sqldrivers
2009-04-01 15:53 2*359*296 libmysql.dll
2009-04-22 10:58 2*168 libqsqlite4.a
2009-04-22 10:58 2*178 libqsqlited4.a
2009-04-30 18:01 2*182 libqsqlmysql4.a
2009-04-30 18:00 2*192 libqsqlmysqld4.a
2009-04-22 10:57 2*178 libqsqlodbc4.a
2009-04-22 10:57 2*182 libqsqlodbcd4.a
2009-04-15 14:16 347*648 qsqlite4.dll
2009-04-29 18:42 2*793*327 qsqlited4.dll
2009-04-30 18:01 81*920 qsqlmysql4.dll
2009-04-30 18:00 1*587*413 qsqlmysqld4.dll
2009-04-22 10:57 152*576 qsqlodbc4.dll
2009-04-22 10:57 1*593*196 qsqlodbcd4.dll
But driver still can't load :
I use QTCreator.
---- Edit ----
configure -qt-sql-mysql :
Code:
...
Sql Drivers:
ODBC....................no
MySQL...................yes
OCI.....................no
PostgreSQL..............no
TDS.....................no
DB2.....................no
SQLite..................plugin (qt)
SQLite2.................no
InterBase...............no
...
-
Re: MySQL driver , I have, it still not loaded
Try to copy mysql files to %QTDIR%\bin directory, it worked for me...
-
Re: MySQL driver , I have, it still not loaded
Quote:
Originally Posted by
MarkoSan
Try to copy mysql files to %QTDIR%\bin directory, it worked for me...
:/ no, it dosn't work . I still have error :
-
Re: MySQL driver , I have, it still not loaded
make shure that you have the libs and headers from mysql.com whithin the same directory that the aplication is executed
-
Re: MySQL driver , I have, it still not loaded
Hi , I recompile all QT library in QTCreator, but before I :
1. Copied files from :
Code:
C:\Program Files\MySQL\MySQL Server 5.1\include
and
Code:
C:\Program Files\MySQL\MySQL Server 5.1\lib\opt
to
Code:
C:\Qt\4.5.1\src\plugins\sqldrivers\mysql
2. I edit:
Code:
C:\Qt\4.5.1\src\plugins\sqldrivers\mysql\mysql.pro
and in line were is :
LIBS *= -llibmysql
change to
LIBS *= -libmysql
3. You must check that you have a files :
Code:
libmysql.a
libmysql.dll
libmysql.def
because in many tutorials is create different file name like : liblibmysql
4. In QTDir run :
Code:
configure -qt-sql-mysql
5. I opened in QTCreator file:
Code:
C:\Qt\4.5.1\projects.pro
and I click compile.
You didn't must wait to end ,because you only need wait to a moment when all sql driver is end compiled. For safe you wait to end :)
I hope that you understand me :)
-
Re: MySQL driver , I have, it still not loaded
Do you have Qt compiled in debug or release mode?
-
Re: MySQL driver , I have, it still not loaded
i have the same problem with QIBASE !
but QMYSQL work fine with me :)
it's easy to make it working but under linux :( and i see you are using windows !
good luck .
-
Re: MySQL driver , I have, it still not loaded
For me my method is working.
P.S. I programing in Linux, becouse ther I no have any problem's. But now I have a project who must work in Windows as client. :)
-
Re: MySQL driver , I have, it still not loaded
Quote:
Originally Posted by
QAmazigh
i have the same problem with QIBASE !
Me too. Have you solved the problem?
-
Re: MySQL driver , I have, it still not loaded; Firebird response
I've found then answer and I would share with other people that aren't able to make qt app load ibase drive. I hope I can help them.
1. At the beginning of the main.cpp (after creating QApplication instance) put the code line:
Code:
qApp->addLibraryPath(qApp->applicationDirPath() + "/plugins");
Then follows creating connection like this
Code:
db.setHostName("localhost");
db.setDatabaseName(dbpath);
db.setUserName("SYSDBA");
db.setPassword("masterkey");
bool ok=db.open();
2. Create "plugins" folder and "sqldrivers" in the first one and put there the driver: qsqlibased4.dll
3. Put fbclient.dll to your app directory
Then final directory tree looks like this (for the debug build):
C:\Project\debug\project.exe
C:\Project\debug\fbclient.dll
C:\Project\debug\plugins\sqldrivers\qsqlibased4.dll
I have a question: what difference is between qsqlibase4.dll and qsqlibased4.dll?
-
Re: MySQL driver , I have, it still not loaded; Firebird response
Quote:
Originally Posted by
lucenty
I have a question: what difference is between qsqlibase4.dll and qsqlibased4.dll?
The latter is a debug version of the plugin. It's required on Windows if your application is built in debug mode.
-
Re: MySQL driver , I have, it still not loaded; Firebird response
I have new problem :(
I have installed the newest QT version (2010.5). I compiled MySql (http://blog.rubypdf.com/2010/08/11/h...s-using-mingw/). I opened QtCreator , compiled my aplication and it worked, so I can be happy .... but I'm no happy beacourse this aplication don't work in another system ..... "Driver not loaded"
(I had copied all library)
Interesing is that this aplication not work ( the same error) when I change the Folder ("sqldriver") name in lokation : "C:\qt\2010.05\qt\plugins\".
So I thought that I must copy all file from this directory to my aplikation directory , then it should work ... but not.
Were is the problem ??
-
Re: MySQL driver , I have, it still not loaded; Firebird response
Quote:
Originally Posted by
bigkoma
but I'm no happy beacourse this aplication don't work in another system ..... "Driver not loaded"
(I had copied all library)
Obviously you havn't or at the wrong place. So where have you copied them? Or have a look at qt.conf to define the place your application should look for the plugins.
-
Re: MySQL driver , I have, it still not loaded; Firebird response
Do you have MySQL client library (not the Qt plugin) installed on the other system?
-
Re: MySQL driver , I have, it still not loaded; Firebird response
Quote:
Originally Posted by
Lykurg
Or have a look at qt.conf to define the place your application should look for the plugins.
Where do I have to look for this?
=====================================
edit
=====================================
Lykurg - thanks for information, :)
My "qt.conf" (in my application location) have simple look:
Code:
[Paths]
Plugins = ./plugins
So in location where I have my application, I created new folder "plugins" and copied the folder "sqldriver" from QT location to this folder.