开发者

How to get SQLite database value to android app?

I want to keep only five records in my SQLite database 开发者_JAVA百科if a new value is stored means i want to delete the last record in android application .Please any one help me how to do this

Thanks in advance


You need to write the method of get the count(number of records in sqlite DB), & check if count is 5 then before inserting record into DB you can delete the existing row which you want to remove.( For this also you need to write the method which accepts the some unique key so that you can delete that row only.)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜