For a time now, I've been attempting to update a certain row, and it appears that there are two ways to achieve this. According to what I've read and experienced, you can just use the:
execSQL(String sql) method
Or the:
update(String table, ContentValues values, String whereClause, String[] whereArgs) method.
Actual code.
myDB.update(TableName, "(Field1, Field2, Field3)" + " VALUES ('Bob', 19, 'Male')", "where _id = 1", null);
This is what I'm attempting to do:
In fields where the main key (_id) equals 1, update fields 1, 2, and 3.
Eclipse highlights the word "update" with a red line and provides the following just below it:
The method update(String, ContentValues, String, String[]) in the type SQLiteDatabase is not applicable for the arguments (String, String, String, null)
I suspect that I'm not accurately assigning the ContentValues. Can someone please assist me in the right path?