Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Nov 2010

    SQLite database and QML

    Hi All,
    I'm currently writing an app that needs to read an SQLite db. Can anyone tell me where I can find some example code to do this? I have found one brief example but it doesn't explain where to store the DB in the project structure.



  2. #2
    Registered User
    Join Date
    May 2009

    Re: SQLite database and QML

    Here's some info:

    Offline Storage API

    As mentioned there, you can use the QDeclarativeEngine :: offlineStoragePath() function to get the path.

    On Windows, it defaults to "C:/Documents and Settings/<user>/Local Settings/Application Data/Nokia/QtSimulator/data/QML/OfflineStorage/Databases/"

    On Symbian devices I believe it is "QML/OfflineStorage/Databases"

    It can be changed, though.

    When you create a database (from QML) two files are created, the actual database file, and an INI file. The name of the files is the MD5 of the database name you specified.

    Do some tests, and you will have a better understanding of this.

    Good luck.
    Last edited by cadlg; 2011-03-29 at 16:37. Reason: To avoid an unwanted icon

Similar Threads

  1. SQLite and or other database.
    By shawty in forum Mobile Java General
    Replies: 6
    Last Post: 2010-03-26, 12:22
  2. sqlite database on symbian devices
    By simmik in forum Symbian
    Replies: 2
    Last Post: 2007-05-17, 13:08

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts