mardi 7 avril 2015

How to retrieve data from SQLite table with inserted values

I have dozens of data value that already inserted inside Database class that extends SQLiteOpenHelper , however i want to get the data values from it and not just to view but use the values, to calculate them. I've been reading lots of examples and following tutorials, but none of them ever explain how to get a data or some data and make a use of it(in my case, use them as java variables(get from inserted data then send to another class)). To take few(not all at once), select 1 or couple to be a multiplier for user input. My app will calculate pmt function, which the user will input the price and etc, then when the user press calculate the app(will do in background) access data from database class(the value that have been inserted) get them, send them via intent to another class, then calculate the database values along with user input.


In short, the app have stored values inside its database that will then be called whenever a button is triggered. Passing the existing values to another class.


I've tried this far My Previous post, click here


There i was trying to send a data(testing) from database to a class(that should have retrieved but it got null values) The question: How to get a data(datas) from a database which have inserted values to another class and make a use of it as some calculate-able values?


thanks in advance.


Aucun commentaire:

Enregistrer un commentaire