Question: i'm tying to create an apps in android which will allow the user to edit the personal info and save it again and it must override the old info....i tried but i didnt win :(.. im new in android please help here my code....

database.../////

//--updates a record--
public boolean updateRecords(long rowId, String NAME ,String SURNAME,
 String DateOfBirth, String HomeAddress,String EmailNO,
 String PhoneNumber, String City,String TypePayment,
 String ShippingType,String CardNumber,String Username, String Passwords )

{
 ContentValues args = new ContentValues();

```
args.put(COLUMN_NAME,NAME);
args.put(COLUMN_SURNAME,SURNAME);
args.put(COLUMN_DATE_OF_BIRTH,DateOfBirth);
args.put(COLUMN_ADDRESS,HomeAddress);
args.put(COLUMN_EMAIL,EmailNO);
args.put(COLUMN_PHONE_NUMBER,PhoneNumber);
args.put(COLUMN_CITY,City);
args.put(COLUMN_PTYE_PAYMENT,TypePayment);
args.put(COLUMN_SHIPPING_TYPE,ShippingType);
args.put(COLUMN_CARD_NUMBER,CardNumber);
args.put(COLUMN_username,Username); 
args.put(COLUMN_Password,Passwords);

return db.update(USERS_TABLE, args,COLUMN_ID + "= "+ rowId,null)>0;

}

```

and i dont know how to update it in a ACTIVITY CLASS.. help me :)

Answer: 
**You call bad update method**

This `db.update(USERS_TABLE, args,COLUMN_ID + "= "+ rowId,null)` is dangerous, replace this with it, maybe will be problem with this. If it won't work, problem will be elsewhere.

```
db.update(USERS_TABLE, args, COLUMN_ID + "=?", new String[] {String.valueOf(rowID)}) > 0;

```
You should know the contact id in-order to update that.

<http://www.higherpass.com/Android/Tutorials/Working-With-Android-Contacts/> is also helpfull.

Thanks