mercredi 22 avril 2015

Why is my SQLite database operation "updateinformation2" not changing my "name" value?

I have made a database operation that should accept: new name, new email, old password and new password as arguments. It should then update the database with the new information, that has been entered by the user, but it doesn't work! I honestly do not know why, here is my code:

    public void updateInformation2(DatabaseOperations dop, String nname, String nemail, String npass, String opass) {
    SQLiteDatabase SQ = dop.getWritableDatabase();

    ContentValues cv = new ContentValues();
    cv.put(TableData.TableInfo.USER_NAME, nname);
    cv.put(TableData.TableInfo.USER_PASS,npass);
    cv.put(TableData.TableInfo.USER_EMAIL,nemail);

    String[] args = new String[]{opass};
    SQ.update(TableData.TableInfo.TABLE_NAME, cv, TableData.TableInfo.USER_PASS+" =?", args);

    SQ.close();
}

if anymore details are needed let me know in the comments and I will update the code.

Aucun commentaire:

Enregistrer un commentaire