SQL Android Error: no such table

后端 未结 1 1859
粉色の甜心
粉色の甜心 2021-01-26 13:49

So every time I enter data into my EditText field, which is located in my AddContacts class, my Dialog says that I have successfully added the information, but in the log cat it

相关标签:
1条回答
  • 2021-01-26 14:39

    Did you change DATABASE_TABLE after running your app at least once? If so you need to update your SQLite schema, the easiest way to do this is make DATABASE_VERSION = 2;. Also Android is very particular about the primary key, you should change COL_ID to "_id".

    In the future, you must increment DATABASE_VERSION every time you change your CREATE_TABLE statement. Otherwise SQLite will not have the current information.

    0 讨论(0)
提交回复
热议问题