I was using the Local DB for the first time today for a simple “enter and then graph” data app (two fields), and I quickly discovered that (at this point in time) it isn’t possible to add rows to the Local DB.
I thought a simple work around would be adding “dummy rows” and then manually keeping track of where the real last row is by way of a stored local variable. I did put values (non blank) within the dummy rows.
While this strategy worked fine during any individual usage of the app (e.g. I can add a few rows, view a graph and see the new rows, add a few more, see the additional rows on the graph, etc.) the changes to the Local DB made using the SetCell method do not appear to be persistent beyond a single app session. Specifically, if I get out of the app and restart it, the Local DB changes I’ve made using SetCell are lost.
The Local DB.SetCell method also never appear within the “Click here to edit spreadsheet” design view, including while I’m using the app. I do however know the Local DB data is being changed by the SetCell method, as I pull data from the Local DB as a separate operation in order to graph it.
Is there some sort of Local DB property I may have missed that would enable persistence?
I should add here that I’m using an iOS phone platform, and that I know from practice that stored local variables are persistent across app usage (for example, the aforementioned actual last row of data variable).
Thanks in advance for any help you may be able to offer!
Thank you for your kind words and confirmation of what I’d experienced.
What’s the next step now, is there a process for bug reporting that I should follow or is this venue sufficient to get in front of the development team?
I have a LocalDB in my project can be edited by the use. The problem is whenever the user closes the app the database resets. How do I make the contents of the database stored on the phones local storage.
Please see the topic: Local DB - persistence of data values using the Local DB.SetCell method
I experienced this problem as well. I could make changes (and view the changes) to the LocalDB during an app session but the changes were not persistant between sessions. I reported this as a bug (github) and had a reply that this functionality is on the ToDo list.
Hi,
I would use Local DB for my app but i read that there are some problems, how do You think to fix?
Also I saw that there is AddRow and SetCell to update value, but there is not DeleteRow I think is fundamental to manage a Database
Best Regards
Marco