• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to store the result of the request in table  RSS feed

 
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
Bartender
Posts: 11445
18
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
Boost this thread!