android sqlite check if inserted new value

后端 未结 3 840
长情又很酷
长情又很酷 2021-01-11 16:13

I\'m working with sqlite. I successfully created database and table. I also wrote code which can insert new values in my table. My code is working perfect, but now I want to

3条回答
  •  庸人自扰
    2021-01-11 16:59

    here is another way:-

    I don't know if I am too late for your project but have you thought of .lastrowid?

    Here is an example of what I did last_rec=self.cursor.lastrowid so lastrec would have the number of the last row inserted.

    Here is the info from sqlite.org

    Hope it helps, you , or anyone else who wonders about this.

    Kind regards and all the best :¬)

    joe

提交回复
热议问题