Reputation: 9131
I am trying to learn Monotouch and have an SQLite db with information. Using the examples here I can open, fill and query the database (which is set as "Content" in my project), but when I rerun the program, no data exists in the database again.
I am guessing that somehow I have to save the database file to the Documents directory after changing it, but I can't quite figure out how to do that. Do I have to open the file with File.Open, then open another one in Documents and write to that one line by line? That doesn't seem efficient or correct.
Does anyone have any examples of this?
Upvotes: 0
Views: 505
Reputation: 89129
What is the "Copy to Output Directory" set to for you db file? I'd guess the most likely problem is that every time you build in the IDE, the blank db is overwriting the modified db from your last session.
Upvotes: 1