[android-developers] Re: Null Pointer Exception on simple People query

2008-05-07 Thread kingkung

I'm sorry, it's not that it returs a null pointer exception, it's that
when I query the People database on my second activity, cursor.first()
returns false!!!  All of the people are still in the database
(nothing's changed)... why would the query from my first activity
return the list of People, and an identical query return nothing?

I'm very puzzled.

Thanks,

James

On May 6, 8:03 pm, "Ahmet A. Akin" <[EMAIL PROTECTED]> wrote:
> maybe you should write the stack trace.
>
> On Tue, May 6, 2008 at 9:29 PM, kingkung <[EMAIL PROTECTED]> wrote:
>
> >  Hey all,
>
> >  Not sure what I"m doing wrong...
>
> >  I have a dbHelper which makes a query for all of the rows in People.
>
> >  When I do this query in my first activity, initializing dbHelper with
> >  that activity, I get all the people as I am supposed to.
>
> >  However, when I do the query in my second activity, with its own
> >  dbHelper initialized on its own activity, the cursor is assigned
> >  null!!  I call cursor.first(), and the app throws an NPE.
>
> >  Nothing about the People database has changed... the table is the same
> >  between the first and second activity.
>
> >  Anyone know what is going on???
>
> >  Thanks,
>
> >  James
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Null Pointer Exception on simple People query

2008-05-06 Thread Ahmet A. Akin

maybe you should write the stack trace.

On Tue, May 6, 2008 at 9:29 PM, kingkung <[EMAIL PROTECTED]> wrote:
>
>  Hey all,
>
>  Not sure what I"m doing wrong...
>
>  I have a dbHelper which makes a query for all of the rows in People.
>
>  When I do this query in my first activity, initializing dbHelper with
>  that activity, I get all the people as I am supposed to.
>
>  However, when I do the query in my second activity, with its own
>  dbHelper initialized on its own activity, the cursor is assigned
>  null!!  I call cursor.first(), and the app throws an NPE.
>
>  Nothing about the People database has changed... the table is the same
>  between the first and second activity.
>
>  Anyone know what is going on???
>
>  Thanks,
>
>  James
>
>  >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---