This week's book giveaway is in the Agile forum.
We're giving away four copies of Fixing your Scrum and have Ryan Ripley & Todd Miller on-line!
See this thread for details.
Win a copy of Fixing your Scrum this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

Need to connect to DB and get some records

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,

I am new to Android world, I practiced some examples.

My query is::

we are using DB (Oracle) I want to write a program which should get all the data in a table and I want to display these records on my simulator using pagination.
when i read some set of links(in Google) sqllite will be useful to retrieve the data from DB.
but I don't know where to configure my connection properties.. and so on.
If you have any information regarding this, it will be great.
 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not necessarily. Just because you are accessing records against a DB on the server does not mean you need a DB of any kind on the client side (your phone).

If you do not need to store the data on the phone, there is no need to keep in SQLite. If you just want to display the data on your phone, you would be better off defining common access paths to the data on the server (all records that match a certain date or region, all records pertaining to a particular business unit, etc), building the ability to access that data from a REST-based web service (returning the data using the JSON notation) and calling the web service from the phone (Spring offers their RestTemplate client).

So the first question you need to ask yourself. If a user brings up the app on their phone and there is no network connection, do they need to see the last good set of data brought across from a previous connection? If not, no need to store it. If you do need to display the last best set of data, ask yourself, how sensitive is the data? If the person lost the phone and someone accessed the phone and the data, is that loss critical?
 
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For accessing sqlite db in android look into SQLiteOpenHelper class.
 
Vijay Rani
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Hoekstra,

We are now going to use REST-based web service.
 
Swastik Dey
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What was your exact requirement? Connect to a web service deployed on any server or connect to local android db?
 
No prison can hold Chairface Chippendale. And on a totally different topic ... my stuff:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic