Invalid statement in fillWindow()

感情迁移 提交于 2020-01-05 04:14:07

问题


Am I missing a close()?

Ok, I have an error on my emulator, but it doesn't force close. It's a cursor Invalid Starement in fillWindow() with a PID of 651. I know it has to do wih my database cursor. My ListView is filled by startManagingCursor(c), but I'm not sure If I need to close it, I'm not using a managed query.

In my onCreate I have

db = new DBase(this);
db.open();
fillData();
db.close();

and in my onResume I have

db.open();
fillData();
db.close();

I've tried putting db.close(); in my onDestroy and it still throws that error.


回答1:


onCreate

db = new DBase(this);
db.open();
fillData();

onResume

fillData();

onDestroy

db.close();

worked.



来源:https://stackoverflow.com/questions/9049542/invalid-statement-in-fillwindow

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!