在fillWindow无效的声明() [英] Invalid statement in fillWindow()

查看:148
本文介绍了在fillWindow无效的声明()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我缺少一个的close()

好吧,我有我的模拟器错误,但它并不强制关闭。这是一个光标无效Starement在fillWindow()与651.我知道它必须做我的王氏数据库游标一个PID。我的ListView是由填写startManagingCursor(C),但我不知道如果我需要关闭它,我的不可以使用管理查询。

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.

在我的onCreate我有

In my onCreate I have

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

在我onResume我有

and in my onResume I have

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

我试图把 db.close(); 在我的onDestroy,它仍然抛出这个错误

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

推荐答案

的onCreate

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

onResume

onResume

fillData();

的onDestroy

onDestroy

db.close();

工作

这篇关于在fillWindow无效的声明()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆