What isn't this code inserting values into SQLite database?

前端 未结 3 763
时光取名叫无心
时光取名叫无心 2021-01-26 10:16

I am writing an app for android. I need to read a txt file and write the data in an SQLite file. I have managed to complete all the code, but the part where it should insert the

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-26 10:57

    instead of db.insert() ... use db.insertOrThrow(), probably some constraint error.

提交回复
热议问题