引起:android.database.sqlite.SQLiteException:没有这样的列:l

时间:2015-09-14 05:34:20

标签: android sqlite

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 "+ ")";

列出项目

 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);
    }
}

0 个答案:

没有答案