For COMPLETE TUTORIALS see here :
in DABASEHELPER CLASS :
ContentValues cvupdate = new ContentValues(); // Bundle for writting the database fields cvupdate.put(KEY_NAME, namestr);// put the values passed to ContentValues cvupdate.put(KEY_NICKNAME, nickstr);// put the values passed to ContentValues db.update(DATABASE_TABLE, cvupdate, KEY_ROWID + "=" + smodify, null);// specify where to be changedin sqlite.java :
String Namestr = editName.getText().toString(); String Nickstr = editNickName.getText().toString(); String smodify =editinfo.getText().toString(); long lmodify =Long.parseLong(smodify); DBAdapter adaptmodify =new DBAdapter(SQliteExample.this); adaptmodify.open(); adaptmodify.updateentry(lmodify,Namestr,Nickstr); // pass index and new values to be inserted adaptmodify.close();
Comments
Post a Comment