×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jun 2009
    Posts
    37

    how to flush sqlite data base when we installing and uninstalling deb

    hi All,
    i need to flush my sqlite database when we do the installation of Qt maemo application and
    need to drop database when we uninstalling deb package.

    thanks
    ~Wiswa

  2. #2
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: how to flush sqlite data base when we installing and uninstalling deb

    You should include database into the package in /usr/share/applications/YOUR_APP_NAME/YOUR_SQLITE_DB.sqlite
    When launch your application, check if the file in getenv("HOME")/.YOUR_APP_NAME/ exists, if not, copy /usr/share/applications/YOUR_APP_NAME/YOUR_SQLITE_DB.sqlite there.
    These kind of files normally are not removed, when unistalling the package as in general you would need to locate all users and all their home directories, check those for the database file and remove it, when found. On N900 there is only one user, so you can actually check /home/user/.YOUR_APP_NAME/YOUR_SQLITE_DB.sqlite only, but this is kind of dirty hack.

Posting Permissions

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