Disappeared on update SQLite database

Hi all

I just submitted an update of my application that uses a SQLite database.  In the update, I changed the table creation code and removed one of the columns of the table.  Nothing else has been changed with the code base.  And I still have the clause "if not exists" in the create table sql statement.  BB has approved my application and I downloaded the version on my PB noticed two horrible things.

First of all, I have now two icons on my homescreen with the same name.

Secondly, when I start the new version, nothing in my database.  It seems to create a new as if the other did not exist.  I went back to my source code and I tried to create two tables with the same name and reinsert the old column that I had deleted, but as I had suspected, the program threw a "table already exists error" when I tried to run the second create statement.

Have I missed something obvious with SQLite databases?

Also, I changed the minimum required version of Tablet OS to 1.0.6 requirement of 1.0 for my application.  Would this have something to do with the duplication?

When you test this point until I published, there was no duplication and my SQLite data are not allowed.  I since temporarily withdrew my application of the sale.

Thank you very much all the advice.

As John said, you have changed your application somehow signature, so that it shows up as a brand new application.  It is usually because you asked new signature keys, but it can also occur if you have changed the package of your application, or possibly other ways id.

Moreover, there is no way to actually remove a column in SQLite, so what you try to do it very probably won't work anyway.

The table creation code is executed only once.  After that, the table exists and you can't run again. There are some statements like 'ALTER TABLE ADD COLUMN xxx foo' that could add a column, with some restrictions, but there is no equivalent 'DELETE a COLUMN '.  The only way to do that is to create a temporary table with the missing column, copy the data from the old to the new table, DELETE the old table, then rename the temporary to the old name.

Often, you may be better to do something as affecting only the old NULL column (if you have authorized that) or just ignore him.

In the future, always test thoroughly using the version signed by your application, just prior to submission.  Make sure you have the previous signed version installed first, so that you can simulate the "update" to the new, but also test with no previous version installed.  You should be able to observe the same behavior that users see by doing this.

Tags: BlackBerry Developers

Similar Questions

  • Test a SQLite database conversion: Please advise

    Hello

    In my application, I use a SQLite database to store data. I'm about to release a new version that contains several additions and modifications to the database. I obviously need to test the conversion, but have no idea how simulate this. I have two projects in FlashBuilder, one contains the old version, the other new version. The project names must be different and thus the name of the - app.xml, but the content is the same except for the version number. The is also the same. I expect that would do the trick to access the former base of the old project to the new project, but it seems not to happen.

    Any ideas or suggestions are highly appreciated.

    I found the following to test my update: first copy and paste the code of the old version of the app in the current .AS file and run it. Then add some data (for example via the Simulator), then copy and paste the code from the new version of the app in the current .AS file and run it. Space-saving, but it works.

  • When sqlite database will be located in the Simulator.

    Hi all

    I wanted to get the location of the sqlite database file, but don't really know where it is located.

    Here is my code to create a database.

     QSqlDatabase database = QSqlDatabase::addDatabase("QSQLITE");
     database.setDatabaseName("./data/customerDatabase.db");
    

    Any help would be appreciatied.

    Oh, I think that I understand your question now.

    The db file will be updated

    //data/customerDatabase.db

    The com.example.quotes.testDev_mple_quotes19e3de88 file will be little difference in your Simulator. You must use the System target file browser (Windows--> views show others-->--> QNX target--> target file system browser) to navigate to this folder.   You should find the folder with the name of the started by your package declared in your bar - descriptor.xml name.

  • Ugh... Requirement: A TimerTask making an HTTP call, parsing JSON, insertion into a SQLite database.

    How to implement a better design of the following?

    I have a UiApplication which has the following requirements:

    1. A static timer in the class that extends UiApplication.
    2. A class that extends screen and contains a class internal which extends TimerTask.
    3. When a user accesses to the screen, the TimerTask is started with:
      _timer.schedule(MyTimerTask, 1000, 15000);
      
    4. The first step is to do an HTTP call and return a valid JSON object which varies in structure - that is, it has a wide variety of paintings and JSON objects.
    5. The second step is to analyze and insert the JSON object values into tables in a SQLite database. The SQLite file is on the map.
    6. The third step is to read the updated SQLite table, loop through the table and build my ObjectListFields with the new values, and attach them to a VerticalFieldManager.
    7. The fourth step is to replace the old VerticalFieldManager with the new VerticalFieldManager and push the screen pop and updated then the current screen - so I have a stack of view high one single layer.

    Now the logic is actually on the spot, but since the TimerTask must cover every 15 seconds, I am a memory leak in all directions.

    To try to solve this problem, I have:

    • Cancelled the TimerTask with the onObscured and the onUiEngineAttached (false).
    • Restart the TimerTask with onExposed and onUiEngineAttached (true).
    • My DatabaseConnection closed the finally statement.

    However, when I look at the objects in Eclipse BlackBerry objects View when the TimerTask is not running, I still see 1 ~ 4 TimerTask objects and 1 ~ 4 DatabaseConnection objects.

    TimerTask both DatabaseConnection have a static instance (I don't have several entry points) with the following in my class that extends UiApplication:

    public static Timer _timer = new Timer();
    public static Database db = null;
    

    I attribute db when I need it with a call to DatabaseFactory.open within the class that extends TimerTask.

    Now that the business logic is correct, how to improve the design so I don't not leaking memory in every way?

    The statement closed the database is being called in, because I can set a breakpoint and see it has reached.

    Instead of onObscured/etc, you can move them into onVisibilityChange (boolean) is only in one place. Cancel your existing TimerTask before running a new, or at least check the TimerTask reference if you are only creating a... not just passing 'New TimerTask' in the calendar method without being able to track this object reference.

  • Publish updates of database with an Application upgrade/new version

    We use the SQLite database for our app, we are faced with a question, whenever we release the new version of the application of DB (schema) changes you have uninstall the currently installed version and then re-install the latest version to get the latest changes to DB.

    Is there a way where we can run script DB with the upgrade of the application. We intend to use the methods LifeCycleListener, we run the script at the start method.

    Hello.

    If you add just new columns nullable or nine tables, you can certainly run a DDL script in the appropriate LifeCycleListener method. In some cases, you will need to create a temporary database, copy all the data, then delete the current DB and put the temperature in his place.

    To simplify things, I suggest you add a 'version' table in your database where you will store the version number of DB. Just do a quick query to obtain the number, then run the appropriate DDL statements.

    However you app is distributed, there is the possibility that users might ignore some updatesif app they were offline for an extended period. Therefore, you should check that your code is able to apply all relevant DB updates sequentially. This means that, if a user updates to v1.0 v3.0 (jump v2, 0), the app starts the DB from 1.0 to 2.0, then from 2.0 to 3.0. In other words: never assume that all users update to current-1 to the current version.

    Best regards

    Frédéric Desbiens

    Senior Product Manager

    Mobility and Cloud oracle

    Twitter: @BlueberryCoder

    blog: http://blogs.oracle.com/blueberry

  • How to find the SQLite database browser on an imac

    Where is the SQLite database browser on an iMac?

    Here, you can get a http://sqlitebrowser.org/

  • application nike + ipod disappeared after updating to IOS 9

    application nike + ipod disappeared after updating to IOS 9

    Can you help me?

    How to get back to IOS 8.4.1

    Best regards

    DILPRINCIPE

    There is no restore IOS. It seems that Nike was not interested in the old app/device support. There is a Nike + running app that you can get to replace that uses the accelerometer in your device iOS instead of the Nike sensor +.

    TT2

  • Update the database

    Hello everyone
    I was a novice, recently made an update of database program has encountered difficulties, and to view the data in a table to view and change any value, but how do I change the data in the table after a single batch update the corresponding database table (similar to a storage operation library and warehouse) , I hope you expert advice, there are examples of the theme or reference to find out the best thanks!

    Help-> find examples-> database

    /Y

  • "Update the database", then stop playing audiobooks

    Hello.  I'm very frustrated and I hope you can help!

    I have been happily using my SansaClip for about eight months, but then a few weeks ago it stopped working correctly.

    When I turn it on, I get the message "Update the database" with a progress bar.  She fills in one or two seconds, and then for the regular menu, and looks like normal.  However, after listening to my audio book for a minute or two it just turns off.

    I tried to do a hard reset, reformatting, reset, and I've updated the firmware to 01.01.30, but no luck.

    Now, it behaves even more erratic, for example not immediately turn on, turn off even before I can choose music, etc.  The battery bar shows about 75% full.

    Any advice?

    Thank you.

    Lori

    Connect the player in MSC mode.  (Go to settings > USB Mode > MSCto put the player in MSC mode)

    Connect it to the computer.

    Then use Windows Explorer to do a Format (right click on the device and select Format)

    Next

    Unplug the unit and go to the settings menu and select "Format".

    This should clean the Clip and make it ready to transfer files again.

    You must return to the MTP mode.

  • E250 crashes to update the database

    OK, so I went and re - sync my player the other day.  Since then, when I turn it on, it starts to update the database, and then the screen goes crazy.  Nothing but colored lines.  I can stop, but it will do so when turned on.  I tried to boot from the recovery partition, and put the latest firmware files, it seemed to load, then again became 'crazy' at startup.  It will also do so if I connect to my PC and will not be detected...

    Any help would be appreciated.

    Thank you.

    Jason

    First, just for him heck of it, try to take out the battery (don't lose the screws bit) for a minute or two. It can reset.

    The problem is probably a file that has been bad or has been corrupted by mysterious Sansa bugs. If you are able to connect to the computer in MSC mode, you can run ChkDsk to zap the wrong file.

    If not, you will probably have to format and, unfortunately, lose all the music/video/pictures on it. Create a new empty folder on your desktop called sansa.fmt, go into the recovery partition and drag the sansa.fmt in there. Do not FORMAT THE PARTITION RECOVERY VIA WINDOWS - YOU're going to DESTROY VITAL FILES. When you disconnect, the Sansa will set up. Recharge a few albums at a time. Your most recent file was probably the one that crashed it.

    If it was the fault of a file that you added - and personally and not scientific, I don't think that it's always - you should look at the tags of your files and use a good tagging program, mp3tag. More information on ID3 tags here.

  • Sansa E280 going to update the database when it is connected to the computer

    Hello

    Just at the moment where I was getting things straightened on my drive and everything was working fine, I plugged my E280 on my computer and it says "Refresh database" on the player and my computer does not see the E280.

    I've been looking around on the forum, and there are so many different options to try (of: delete the SYSTEM folder, which I was told not; to turn off the drive and engaging the hold button and the button to rewind when connecting to the computer, etc., which I tried ~ nothing; take off Firmware and put one on; do something in Recovery Mode) , which I have no idea how do; etc.).  Sorry, but I hope you get my point... What do I do?

    Thanks for any help once more.

    Thank you clu31355.  I tried the very first thing that you said ' put in operation and allow it to update the database (if desired) before you connect. "and voila - it worked.

    These Sansas seem to be quite ticklish - who knows what will happen?

  • Wyse V30LE VNC disappeared after update

    Wyse V30LE VNC disappeared after update

    Is it possible to restore the software TighyVnc on firmware for Wyse V30LE was last updated?

    Hello Rogerio,

    Do you like the answer.

    One of my superiors I shared the add-on remote shadow for CE device yesterday. I downloaded for the link below.

    App.Box.com/.../y1axhtd69hqmzcaygle9crwx8cfkyrf8

    I tried to install on my workstation and VNC has been successfully installed.

    Hope this helps someone to solve the problem of the shadow (VNC) remote on thin client with B674 V6.0.

    Thank you

  • How to add a sqlite database to package for playbook

    I use FlashBuilder Burrito and you have created an application that retrieves data from an sqlite database file. It works fine on my computer, but in the Simulator, it does not find the database. I think that I tried to add the file anywhere in the package, but it never works on the playbook. If I create the database in the code, it works fine, but I need to package the database programmatically.  Can someone point me in the right direction?  Thank you

    This database is read-only?  Never need to change?  If this isn't the case, you'll want to copy it in the folder appstorage as shown in this other thread.

    In any case, you seem to have lot able to find the database file. Here's what I would do in your place.

    Take your .bar file and extract it or dig in there.  It's just a .zip with a different extension file, so I assume that you know how to do it.

    Inside, there are files in the file meta-inf / folder (at the less OBVIOUS. MF that is interesting to look at) and air / folder.  All application files (.swf, assets, etc.) are air / folder.

    To do anything in this air / folder, use File.applicationDirectory.  Which means that if, for example, your database is in air/foobar/mydata.db in the .bar file, you will get a path as follows:

    File.applicationDirectory.resolvePath('foobar/mydata.db').nativePath
    

    Who help me?

    You can see that the file is in a different location in the simulator that where you when you run in with ADLS (test on your development computer) and .bar.  If this is the case, you have several choices, one of which is to change the layout of a way to always appear in the same place, anywhere that you test.  Someone who uses actually an IDE would have to help you with that...

  • Is it possible to display the SQLite database?

    I can debug my app on my Playbook, but is it possible to display the SQLite database? I want to confirm it works.

    If you can recover on your PC/Mac, I use "Lita" SQLite DB management applications (its an AIR application).

  • Difficulties to use Task Scheduler to update the database of the program

    Hello

    I would like Win 7 Task Scheduler to cause Locate32.exe Explorer file update there database every 45 minutes when I am connected. (Locate32 can do it by itself, but must operate continuously in the background to do).  I'm obviously not in the right info, because it does not work for me. I got the details to enter another site, as I am not familiar with the Task Scheduler.

    Task field name walked - locate32.

    In trigger I select daily

    then by selecting a time of 5 minutes before present, to test works

    then, in the action, I'm selecting Start a program

    then in program/script I enter 'C:\ProgramFiles\Locate\locate32 '.

    then in arguments - U

    Usually it is a notification when I update of database Locate32. This does not occur with the scheduled task, and when I look in the Task Scheduler for tasks that have been made, this one does.

    I checked the user information is correct.

    Please could someone tell me what I should do instead? Thank you, Jay

    Hello

    We apologize late in the response. This problem can be caused by incorrect settings.

    To display hidden scheduled tasks, follow these steps:

    1. Click Start. In the search box, type Task Scheduler. Then, in the list programs, click Task Scheduler.

    2. On the view menu, click Show hidden tasks.

    Try to re-create the task and check if it helps:

    1. Press the Windows key + R > type taskschd.msc and press enter (it will launch the Task Scheduler)
    2. Click with the left button of the right pane on the Task Scheduler Library > open Action on the menu at the top of the page > new folder... > name MyTasks > click OK
    3. Left-click on the MyTasks > menu, choose Action > create a basic task (it open Assistant tasks)
    4. You can enter the name , for example "restart" and press Next
    5. In the trigger section, you can specify when you want to run your task, for example:
      • Select daily and press Next
      • Now, you can specify the day, time and the game to be repeated daily, after that press Next
    6. In the Action section, you can choose what you want to run, for example, restart your system to do this:
      • Choose start a program and press Next
      • in the area of program/script, type shutdown /r and press next
    7. And that's all, you can press Finish

    Let us know the status.

Maybe you are looking for