Re: [android-beginners] Problem with cursors

2010-06-18 Thread Mikey
Well, thanks - that seems to have done the trick, but now I am getting another error with another method - maybe you can tell me if you do things differently here as well? public boolean isPermanent(String screen_name) { boolean output = false; try {

Re: [android-beginners] Problem with cursors

2010-06-18 Thread Justin Anderson
So what is the error and where is it occurring? -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Fri, Jun

Re: [android-beginners] Problem with cursors

2010-06-18 Thread Mikey
The error is an IllegalStateException and as it is happening in this daemon thread I have no idea where it is occurring. It is very weird as my application has gone well past the point where it is using this query, and I have a breakpoint on the catch block that is not reached. Very

Re: [android-beginners] Problem with cursors

2010-06-18 Thread Justin Anderson
Perhaps this will help: http://stackoverflow.com/questions/2398209/how-to-handle-in-code-illegalstateexception-on-cursor BTW, I fond this by googling Android IllegalStateException daemon -- There are only 10 types of people in

Re: [android-beginners] Problem with cursors

2010-06-18 Thread Mikey
Thanks, I had already seen this article, but I am not really sure how I can call Activity methods in my DbAdapter, and I don't really want to return a cursor to my Activity - I just thought you may have some more magic code that would fix my problems ;o) I will let you know how I get on... On

Re: [android-beginners] Problem with cursors

2010-06-17 Thread Justin Anderson
Did this help? -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Wed, Jun 16, 2010 at 2:38 PM, Justin

Re: [android-beginners] Problem with cursors

2010-06-16 Thread Justin Anderson
I'm not entirely sure, but I noticed my code is a little different than yours... Before I loop over the rows in the cursor I call moveToFirst(). So, with your code that would be c.moveToFirst() right before the while loop. I seem to remember having some weird issues with the Cursor class but

Re: [android-beginners] Problem with cursors

2010-06-16 Thread Mikey
Mostly desperation - I will give your idea a try though - thanks! Mikey On 16 Jun 2010, at 21:04, Justin Anderson wrote: I'm not entirely sure, but I noticed my code is a little different than yours... Before I loop over the rows in the cursor I call moveToFirst(). So, with your

Re: [android-beginners] Problem with cursors

2010-06-16 Thread Justin Anderson
Also, I use different methods in my while loop: Cursor dbCursor; ... dbCursor.moveToFirst(); while (!dbCursor.isAfterLast()) { //do stuff dbCursor.moveToNext(); } -- There are only 10 types of people in the world... Those