0

Here is my the query. Can any one please check is it write or wrong..thanks.. because i am getting nuller pointer exception

mydb.rawQuery("UPDATE "+ TABLE + " SET ReferenceNo= '"+ref.getText().toString()+"' , Mobile= '"+mob.getText().toString()+"' where ID= '"+id +"'", null);
3
  • 1
    Is ID a number? Also, if you are getting Null Pointer Exception, please make sure mydb, ref and mob are not NULL. And, please post the Logs as well.
    – jagmohan
    Nov 22, 2013 at 6:44
  • 2
    Show some more code. As if you are getting the nullpointer exception there must be any of value mob.getText().toString() ,ref.getText().toString() or id can be null. Make sure you have initialized the views and setting values into it.
    – GrIsHu
    Nov 22, 2013 at 6:49
  • Query seems okay as you are not getting SqliteException. There must be problem with variable values. Nov 22, 2013 at 6:54

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.