Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • No, it won't cause a NullPointerException - it would throw an error - a CursorIndexOutOfBoundsException Commented Jun 28, 2012 at 20:29
  • It must be your db variable. Everything else would work. How are you initialising it. I recommend structuring your code like this anyhow to prevent further errors. And looping through, using Cursor.moveToNext Commented Jun 28, 2012 at 20:46
  • @Doomsknight I knew what is wrong I'm trying to check the table befora it was created and now I have to change my query to check for tables in the DB do you have any idea how to do that Commented Jun 28, 2012 at 20:59
  • @user1480009. This question might help stackoverflow.com/questions/167576/… Commented Jun 29, 2012 at 8:12