Results 1 to 2 of 2

Thread: Android / necessitas: SQLITE error ("Driver not loaded")

  1. #1
    Join Date
    Dec 2009
    Posts
    47
    Thanks
    11
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android

    Default Re: Android / necessitas: SQLITE error ("Driver not loaded")

    Hi
    I use necessitas to write a database application for Android. There is an error when opening the SQLITE database. To track the error, the app writes debug strings to QListWidget debugWidget.

    Qt Code:
    1. QSqlDatabase winebase;
    2. winebase = QSqlDatabase::addDatabase(QLatin1String("QSQLITE"));
    3. QString databaseFile;
    4. debugWidget->addItem(databaseFile);
    5. QFile databaseF(databaseFile);
    6. debugWidget->addItem(QLatin1String(databaseF.exists() ? "exists" : "NOT exists"));
    7. winebase.setDatabaseName(databaseFile);
    8. debugWidget->addItem(winebase.isValid() ? QString(QLatin1String("winebase valid")) : winebase.lastError().text() + QLatin1String(" wb error"));
    To copy to clipboard, switch view to plain text mode 

    The database file exists, but winebase.lastError().text() is "Driver not loaded Driver not loaded" (presumably duplicated because QSqlError::text() concatenates error strings from databaseText and driverText).

    How to install QSQLITE driver on Android device?

    Hard- and software details
    device: Acer iconia Tab A500 running
    OS: android 3.1 Honeycomb (i.e., API level 12)
    QtCreator: with necessitas 4.7.62.1, libraries installed on device using ministro
    Desktop OS: Ubuntu natty

    Al_

    PS: application runs fine on desktop



    Added after 41 minutes:


    After some further google searches, it seems that somebody found a solution, see https://groups.google.com/forum/#!to...qt/YkwoA42_mzU (answer of Anonymous, 18-Aug-2010). However, I do not find androidconfig.sh (Linux:/$ sudo find . -name androidconfig.sh returned nothing).

    Has the file androidconfig.sh been renamed since Aug 2010? Where should it be located?

    Al_
    Last edited by Al_; 21st August 2011 at 16:13.

  2. #2
    Join Date
    Dec 2009
    Posts
    47
    Thanks
    11
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android

    Default Re: Android / necessitas: SQLITE error ("Driver not loaded")

    I could meanwhile compile necessitas; the config file is now called androidconfigbuild.sh, and (different from the instructions on the necessitas wiki) it is not in the root of the project directory but in android/androidconfigbuild.sh.

    I am still not able to deploy the library to the device. I open a separate thread for this.

Similar Threads

  1. App found qsqlite4.dll driver file but still "Driver not loaded"
    By merelendor in forum Installation and Deployment
    Replies: 2
    Last Post: 17th August 2011, 12:15
  2. got error message "driver not loaded"
    By rivci in forum Newbie
    Replies: 2
    Last Post: 13th January 2011, 10:37
  3. run time error "driver not loaded" for sqlite.
    By netmat in forum Qt Programming
    Replies: 0
    Last Post: 2nd August 2010, 06:42
  4. Replies: 1
    Last Post: 24th April 2010, 04:43
  5. The strange problem:"QSqlDatabase: QMYSQL driver not loaded"
    By osmanthus in forum Installation and Deployment
    Replies: 2
    Last Post: 22nd January 2009, 16:12

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.