Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7548209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T09:38:26+00:00 2026-05-30T09:38:26+00:00

Im creating an sqlite db in my air for android app inside the following

  • 0

Im creating an sqlite db in my air for android app inside the following function:

protected function createDatabase():void{

        _sqlConnection = new SQLConnection();
        _sqlConnection.addEventListener(SQLEvent.OPEN, openHandler); 
        _sqlConnection.addEventListener(SQLErrorEvent.ERROR, errorHandler); 

        var _sqlFolder:File = File.applicationStorageDirectory; 
        var _sqlFile:File = _sqlFolder.resolvePath("RouteLog.db");          

        _sqlConnection.open(_sqlFile); 
}

i can successfully create tables, insert and select, but each time i re-publish the app from flash cs5.5 the database is overwritten and all data is lost. Totally stumped, any ideas welcome!

Cheers

[edit]

so, i’m publishing a debug release directly from flash pro via usb. When the app is initialised it calls the method above, on receiving the OPEN event it creates a table using the following SQL statement

var SQL:String =            
            "CREATE TABLE IF NOT EXISTS myRoutes (" +
            "id INTEGER PRIMARY KEY AUTOINCREMENT, " +
            "name STRING, " + 
            "created DATE, " + 
            "duration NUMBER, " + 
            "waypoints OBJECT, " + 
            "avgSpeed NUMBER, " +
            "distance NUMBER, " +
            "rating NUMBER" + ")";

I can then run some operations, insert, select etc and everything is as expected. If i exit and re-luanch the app, the previous data sets are intact, but when i re-publish from flash any data stored from the previous release has disappeared.

According to the documentation SQLConnection.open() will open a connection to the file supplied in the parameters and if it doesn’t exist, it will create one…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T09:38:28+00:00Added an answer on May 30, 2026 at 9:38 am

    After further research on the adobe forums I think the answer is that you cannot prevent files stored in the applicationStorageDirectory from being overwritten when re-publishing from Flash Pro.

    The app im building uses Geolocation as a core feature, so I need a real data set to work with. The solution in the end that worked for me, was to copy the database from applicationStorageDirectory to documentsDirectory (sd card) whilst i’m still developing the app (will remove this if it ever gets to market).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When creating my SQLite database in Android I set the database locale - db.setLocale(new
I'm pretty new to android, Java and sqlite. For my first program I'm creating
I'm creating my first android app that will make use of SQlite. I have
I'm creating an AIR application which connects to a SQLite database. The database balks
I'm creating an app that has a database using sqlite. On my app I've
I'm creating a financial app and it seems my floats in sqlite are floating
i am creating an app that needs a database. i created it using sqlite
I am creating an iOS app that reads data from a single SQLITE table
I am creating an app where I am using multiple sqlite databases. I was
Hi I have some problems in creating the sqlite database in android. Everything is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.