Null Pointer Exception on simple People query

by kingkung » Wed, 07 May 2008 01:29:29 GMT


Sponsored Links
 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

--~--~---------~--~----~------------~-------~--~----~



Null Pointer Exception on simple People query

by Ahmet A. Akin » Wed, 07 May 2008 03:03:23 GMT


 maybe you should write the stack trace.




--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Null Pointer Exception on simple People query

by kingkung » Wed, 07 May 2008 15:27:00 GMT


 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




--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. I'm using onSensorChanged(). What should I specify in <uses-feature> ?





If nothing else, try none, either, then both, and see which way makes it
work.

-------------------------------------------------------------------------------------------------
TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
transit tracking app for Android-powered devices

-- 

2. Building/test a new hal implementation

Hello,

how it is possible to build only one libary and not the whole system?

--> like: "make libgps.so"

Is it also possible to develope a hal implementation without the
complete android build system -> NDK?

And my last question is which possibilities are there to test a new
hal implementation?


Best Regards,
Andreas Hornsteiner

-- 

3. How to make glow effect around a bitmap?

4. seekto is not displaying the video frame on mediaplayer, any help?

5. Help: Desireku Error

6. SGS - Not Enough Memory

7. Tanya download file