android sqlite check if inserted new value

后端 未结 3 820
长情又很酷
长情又很酷 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条回答
  •  Happy的楠姐
    2021-01-11 16:45

    long result = db.insert(table name, null, contentvalues);
          if(result==-1)
              return false;
               else
              return true;
    

    this is good solution for it..

提交回复
热议问题