Results 1 to 2 of 2

Thread: Using MySQL databases?

  1. #1
    Join Date
    May 2007
    Posts
    131
    Thanks
    17
    Thanked 4 Times in 2 Posts

    Default Using MySQL databases?

    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");
    db.setHostName("chopin.1go.dk");
    db.setDatabaseName("vinge_db");
    db.setUserName("xxxx");
    db.setPassword("xxxx");
    bool ok = db.open();
    ok;
    }

    Best Regards
    //René

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    99
    Thanks
    1
    Thanked 3 Times in 3 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Using MySQL databases?

    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.

    Everall


    Added after 24 minutes:


    Have a look at the qtcentre wiki :

    http://www.qtcentre.org/wiki/index.p...ws_using_MinGW

    Everall
    Last edited by Everall; 17th December 2010 at 19:43.

Similar Threads

  1. QtSql , how to list all databases on the Mysql-Server
    By luoihoc in forum Qt Programming
    Replies: 1
    Last Post: 7th July 2009, 21:52
  2. How to get list of all databases on the MySQL server
    By jambrek in forum Qt Programming
    Replies: 4
    Last Post: 15th June 2009, 23:48
  3. Qt and databases
    By gt.beta2 in forum Newbie
    Replies: 6
    Last Post: 18th February 2009, 08:39
  4. dictionary databases
    By rishiraj in forum Newbie
    Replies: 1
    Last Post: 5th January 2009, 08:30
  5. Qt, Databases & the DAO Pattern
    By Paul Drummond in forum Qt Programming
    Replies: 1
    Last Post: 22nd February 2006, 16:13

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.