dimanche 13 septembre 2015

Caused by: android.database.sqlite.SQLiteException: no such column: l

Caused by: android.database.sqlite.SQLiteException: no such column: kia (code 1): , while compiling: UPDATE people_chat SET msg = kia WHERE name = uol

final String CREATE_QUERY4 = "CREATE TABLE IF NOT EXISTS "+PEOPLE_CHAT+ "("+ "id INTEGER primary key autoincrement,"+ "name TEXT NOT NULL ,"+ "msg TEXT NOT NULL "+ ")";

List item

 public void upDateMsg(String name,String msg){
        Log.i(TAG, "UpdateData: "+msg);
        String strSQL = "UPDATE people_chat SET msg = "+msg+" WHERE name = "+ name;
        db.execSQL(strSQL);
        Log.i(TAG, "Update Success: "+strSQL);
    }
}

Aucun commentaire:

Enregistrer un commentaire