Android SQLite update example code

Sample code snippet...
public boolean update(Customer customer) {

        ContentValues args = new ContentValues();
        args.put(KEY_STATUS, inspection.getStatusCode());

        return mDb.update(SQLITE_TABLE, args, 
                KEY_COMPANY + "=?" + " and "  +
                KEY_CUSTOMER + "=?",  
                new String[] {
                inspection.getCompany(),
                inspection.getCustomer()}) > 0;
    }

No comments:

Post a Comment

NO JUNK, Please try to keep this clean and related to the topic at hand.
Comments are for users to ask questions, collaborate or improve on existing.