• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to store the result of the request in table

 
Sarra Sakka
Ranch Hand
Posts: 283
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I created a method to store the result of the request SQLite in a table


I want to get the number of elements in this table, so i put this :

But when i compile my application, n get 0 !!!
 
Maneesh Godbole
Saloon Keeper
Posts: 11096
13
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you try setting a break point on line 10 of your getProductName method and see c.getCount() actually is?
 
Sarra Sakka
Ranch Hand
Posts: 283
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I correct it by my self
It's lacks :
if(c.moveToFirst())
{ ...
}
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic