为什么我不能从光标读取布尔类型?我正在使用此代码:
private boolean readBooleanByKey(Cursor cursor, int key) {
try {
return cursor.getInt(key) > 0; // always return false
} catch (Exception e) {
}
}
这是数据库表中DDL的一部分
CREATE TABLE [dn_user_cars] (
[id] [INTEGER PRIMARY KEY AUTOINCREMENT],
[archived] BOOLEAN; // this variable I cant read
我认为SQLite中没有BOOLEAN数据类型。在此处查看一些文档:http : //www.sqlite.org/datatype3.html
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句