File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Android and the fly likes how to store the result of the request in table Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Android
Bookmark "how to store the result of the request in table" Watch "how to store the result of the request in table" New topic
Author

how to store the result of the request in table

Sarra Sakka
Ranch Hand

Joined: Jul 12, 2013
Posts: 253
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

Joined: Jul 26, 2007
Posts: 9990
    
    7

Did you try setting a break point on line 10 of your getProductName method and see c.getCount() actually is?


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Sarra Sakka
Ranch Hand

Joined: Jul 12, 2013
Posts: 253
I correct it by my self
It's lacks :
if(c.moveToFirst())
{ ...
}
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: how to store the result of the request in table
 
Similar Threads
put in LIST Sample Data to debug, also how view SQLITE DB Data from Eclipse IDE for debug purposes
NullPointerException problem
telephonyManager.getCellLocation() gives null
Trying to collect wifi data like Metal Gear Solid Portable Ops
Android CustomListView getView() getting nullpointerexception