sql - How to update a record with multiple keys -


I'm trying a database app on Android.
I want to use the SQLiteDatabase update ...) feature method to update a record Generally speaking, the following code is working properly for the WHERE section of a key that is working on it: -

  values.put ("testname", "quiz1") ; MDB.update ("test", value, "id =?", New string [] {"2"}); // This statement works  

However, I want to update a column in a table that has a combination of two keys as a unique identifier. I tried the following: It is executed without any exception, but nothing is updated.

  values.put ("score", 60); MDB.update ("result", value, "studentid =? And testid =?", New string [] {"2,1"}); // This statement does not work  

How to do it?

I'm not an expert on Android or SQLite, but I think your statement should be: < / P>

  mDB.update ("result", value, "scholarship =? And testid =?", New string [] {"2", "1"});  

Comments