sqlite相同的查询返回不同的值

时间:2019-09-19 09:30:48

标签: sqlite android-sqlite

我有一个具有这种结构的表

id integer not null, 
nome text not null, 
reparto integer not null, 
costo real not null, 
idiva integer not null, 
ckdispo integer not null, 
dispo integer not null

如果我每n秒执行一次此查询

Cursor mCursor = mDb.rawQuery("select * from articoli where reparto = ?", new String[] {String.valueOf(rep)});

有时ckdispo的值(0或1,我将其视为布尔值)是错误的 我用

检查结果
Log.i("articolometadata", DatabaseUtils.dumpCursorToString(mCursor));

例如

...
25 {
    id=1817
    nome=PRUSSIANA 850gr.
    reparto=61
    costo=42.5
    ckdispo=1
    dispo=1
    idiva=1
}
...

成为

...
    25 {
        id=1817
        nome=PRUSSIANA 850gr.
        reparto=61
        costo=42.5
        ckdispo=0
        dispo=1
        idiva=1
    }
    ...

我在做什么错了?

0 个答案:

没有答案