Discussion:
Help me using mysql with qt-creator
Aditya Sharma
2009-08-02 06:19:40 UTC
Permalink
i m learning qt. I am beginner programmer who knows C++. But as given in
tutorials I tried to run programs using mysql database. I have wamp running
in my windows xp box, so that means mysqld is also running. But when i try
to build the code in qt creator, it prompts, driver not installed or
something. Please help.

aditya
Sunil Thaha
2009-08-02 07:43:17 UTC
Permalink
Aditya,

This has got nothing to do with QtCreator mailinglist which answers
questions specific to the IDE. Please use proper mailing list to post your
question, next time. To answer your question
Please read the manual about QSqlDatabase in particular
QStringList QSqlDatabase::drivers ().
Also verify if you have eanble QT += sql in your pro file.

Once again, kindly use the qt-mailinglist to post questions about Qt

Regards,
Sunil
Post by Aditya Sharma
i m learning qt. I am beginner programmer who knows C++. But as given in
tutorials I tried to run programs using mysql database. I have wamp running
in my windows xp box, so that means mysqld is also running. But when i try
to build the code in qt creator, it prompts, driver not installed or
something. Please help.
Post by Aditya Sharma
aditya
_______________________________________________
Qt-creator mailing list
http://lists.trolltech.com/mailman/listinfo/qt-creator
Aditya Sharma
2009-08-02 22:26:18 UTC
Permalink
I did what exactly said in different documentations, but it doesn't seem to
work. I posted here because, I 've been trying for three days without
success. Please help me through. The instruction written here,
http://doc.trolltech.com/4.5/sql-driver.html#qmysql didn't work when i tried
to run nmake, or make command. I did follow through what it was written in
http://christopher.rasch-olsen.no/2009/04/14/qt-45-and-mysql-plugin-with-mingw-on-windows-xp/as
well, but It didn't solve my problem.

Please help.
Qt expects to see db drivers in a subdirectory called "sqldrivers" under
the one containing the executable.
This means that if your installation of Qt hasn't compiled the mysql driver
you will have to. Instructions are in the documentation.
If they are already compiled they will be under Qt\plugins\sqldrivers.
The dll's of the driver you need can be copied from there to the subdir
mentioned above.
i m learning qt. I am beginner programmer who knows C++. But as given in
tutorials I tried to run programs using mysql database. I have wamp running
in my windows xp box, so that means mysqld is also running. But when i try
to build the code in qt creator, it prompts, driver not installed or
something. Please help.
aditya
------------------------------
_______________________________________________
--
----
GreyGeek
“They’ll get sort of addicted, and then we’ll somehow figure out how to collect sometime in the next decade.”
–Bill Gates
“Bill Gates looks at everything as something that should be his. He acts in any way he can to make it his. It can be an idea, market share, or a contract. There is not an ounce of conscientiousness or compassion in him. The notion of fairness means nothing to him. The only thing he understands is leverage.”
–Philippe Kahn
I don't think it's any coincidence that Microsoft achieved dominance in the American market during the same period that bottled water became omnipresent. In both instances, clever marketing convinced the general public that something that was clean, safe and free was inferior to a product encased in plastic.
Continue reading on narkive:
Search results for 'Help me using mysql with qt-creator' (Questions and Answers)
17
replies
learning how to code?
started 2016-03-22 03:07:07 UTC
programming & design
Loading...