i have created table using Sqlite3.and also inserted record in that table.its running successfully.but now i have created another table in same database..and written class for it.
now data is not inserted in another table though i have created table in same database and written respective code for it n XML as well.
i have given toast message after inserting record.it showing me record inserted successfully at position -1..and showing error like this “table is not exists or file encrypted.”
and also if i tried to create table using Sqlite cmd then table is created but i am not getting where that file get stored???
can anyone tell me how to solve this problem.?
if you want code then will put here..
Thanks in Advance—
It is probably because your application is still working with the old database. If you check for an existing database before creating it, then your app would find the old one and use that. But the old database doesn’t have the new table you added.
You should include some sort of versioning of your database and check that when you create your database. Then if the existing database is not up to the latest version, you can overwrite it.
A quick solution is to completely uninstall your application from the phone/emulator and then reinstall/run it, then the database will be up to date.