View Full Version : Using MySQL databases?

17th December 2010, 19:09
Hey Everyone. i have written an application which collects, interprets and shows data. Obviously this application is using a few databases to store the data, and in this case it is two MySQL databases. the application is ready and running in the simulator (without database connection obviously), but when i run it on my test device (N900 - Maemo) nothing happens... -> could someone please just point me in the right direction, so i know what to do, and what my next steps are? :)

the warning i receive is:

QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: avalaibe drivers QSQLITE

here is my call to the database:

void mysql::connectToDatabase_vinge_db()
QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL");
bool ok = db.open();

Best Regards

17th December 2010, 20:43
The only database that is installed by default is sqlite.
That is the feedback you get : only QSQLITE is available at this moment for you.
I guess you didn' t add sqlite when you were compiling, or maybe you are using I binary that is already compiled.

How did you install qt?
If you compiled qt yourself you have to add mysql as an option.


Added after 24 minutes:

Have a look at the qtcentre wiki :

http://www.qtcentre.org/wiki/index.php?title=Building_the_QMYSQL_plugin_on_Wind ows_using_MinGW