SQLite function to Save Properties & Data
Posted: Tue Dec 17, 2013 9:24 pm
A while back, I was concerned about saving properties, text, and configuration data, without having to save the entire stack, which I knew would be problematic in mobile environments. So I wrote this single function that could be dropped into any one of my stacks, allowing me to easily save and retrieve data in a simple SQLite table.
Just recently I needed to use it again, and saw it was done as quick hack. And though it worked, was not very well written. I liked the concept, so I've completely re-written it, so now, it not only works, but the code is very readable, and usable by others.
1- Place your app's name in the "folder.name" variable.
2- Use the "file.name" variable to define a name for your SQLite db file.
3- Then just paste the dbData() into the Stack Script area of your app.
Let me know if you have any questions or concerns.
Just recently I needed to use it again, and saw it was done as quick hack. And though it worked, was not very well written. I liked the concept, so I've completely re-written it, so now, it not only works, but the code is very readable, and usable by others.
1- Place your app's name in the "folder.name" variable.
2- Use the "file.name" variable to define a name for your SQLite db file.
3- Then just paste the dbData() into the Stack Script area of your app.
Let me know if you have any questions or concerns.