This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Java Micro Edition and the fly likes Storing data from a table Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Reply Bookmark "Storing data from a table" Watch "Storing data from a table" New topic
Author

Storing data from a table

Pankaj Bhambhani
Greenhorn

Joined: Aug 14, 2010
Posts: 4
Hi,

I am new to J2ME. I want to build an application that uses a data from a predefined table (about 50 rows and 10 columns big) and then calculates and produces a result.

I want to know a good way to store the data of this big table in the application.

Any help would be appreciated.

Thanks a lot.
Walter Gabrielsen Iii
Ranch Hand

Joined: Apr 09, 2011
Posts: 158
In Java ME you can store data with the following:

You can use arrays and multidimensional arrays, these can take Objects and variables.

The other storage options are in the java.util package:
Hashtable -- This class implements a hashtable, which maps keys to values.
Stack -- The Stack class represents a last-in-first-out (LIFO) stack of objects.
Vector -- The Vector class implements a growable array of objects.

The java.util storage options store only Objects not primitive variables (also see wrapper classes in java.lang for wrapping variables into objects).

Of course, you can also store data by saving/loading it from the device: javax.microedition.rms -- The Mobile Information Device Profile provides a mechanism for MIDlets to persistently store data and later retrieve it.
Pankaj Bhambhani
Greenhorn

Joined: Aug 14, 2010
Posts: 4
Thanks a lot.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Storing data from a table
 
Similar Threads
Accessing data from database
how to initiate hashtable and linklist
Handling concurrent updates using JDBC
Converting resultSet to ArryList
how to write BLOB type of data from java application into an oracle table