This week's book giveaway is in the Beginning Java forum.
We're giving away four copies of Getting started with Java programming language and have Ashish Sarin & J Sharma on-line!
See this thread for details.
Win a copy of Getting started with Java programming language this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Need help in SqlLite database call dont know why the cursor is returning false on moveToFirst call  RSS feed

 
Rohit Gaikwad
Ranch Hand
Posts: 40
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
code is



The screen is sucked on HomeActivity and not calling the next screen intents as cursor is returning false for d.moveToFirst() please tell me where i am going wrong

Thanks in Advance
 
Paul Clapham
Sheriff
Posts: 22114
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I expect that moveToFirst() returns false if the selection has zero rows, no? And it seems to me that the selection could be empty, especially when the table is created just microseconds before. Perhaps you should start some activity when that happens?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!