1
我有以下代码:安卓:访问DB
DbAdapter dbAdapter = new DbAdapter(this);
dbAdapter.open();
ArrayList<String> queryResultList = new ArrayList<String>();
Cursor cur = dbAdapter.db.query("mytable", columns, where, null, groupBy, null, null);
cur.moveToFirst();
while (cur.isAfterLast() == false)
{
queryResultList.add(cur.getString(0));
cur.moveToNext();
}
cur.close();
dbAdapter.close();
此代码的设备在那里从来没有运行,即消灭仿真器,以及在哪里后,去除应用了三星Galaxy S的设备上运行第一次审判。这意味着我正在阅读的数据库首先在设备上创建。这是一个自定义数据库。
在2.2上运行得非常好,在2.1-update1(API级别7)上它不会,isAfterLast()始终为true,但它自API Level 1以来就存在。任何一个想法?或者一个想法我能做些什么来弄清楚?
感谢,A