如何创建一个表并在android中更新它

时间:2014-02-08 08:09:11

标签: android

请任何人建议我如何解决这个问题

  `private static final String CREATE_LOGIN_INFORMATION_TABLE = "create table "
                + LOGIN_SCHEDULE
                + " "
                + "("
                + AUTO_ID
                + " integer primary key autoincrement, "
                + MY_ID
                + " text not null, "
                + DAYS + " text not null, " + MONTHS + " text not null );";
    sqLiteDatabase.update(MaBaseSQLite.LOGIN_SCHEDULE, values,
                    MaBaseSQLite.MY_ID + " = ? AND " + MaBaseSQLite.DAYS
                            + " = ? AND " + MaBaseSQLite.MONTHS + " = ? ",
                    new String[] { loginResponse.myid, loginResponse.totalday,
                            loginResponse.totalmonth });`

当我使用此代码进行更新数据时,我得到了

`Error updating months=1,1,1,1,1,1,1,1,1,1,1,1 mid=Lenovo#1394 days=0,1,1,1,1,1,0 using UPDATE login_schedule SET months=?, mid=?, days=? WHERE mid = ? AND days = ? AND months = ?
    android.database.sqlite.SQLiteException: no such column: months: , while compiling: UPDATE login_schedule SET months=?, mid=?, days=? WHERE mid = ? AND days = ? AND months = ? `

此错误

我无法理解这里的问题是什么,请告诉我应该怎样做才能解决这个问题

0 个答案:

没有答案