Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
Sheriffs:
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • fred rosenberger
  • Frits Walraven

Using a MIDlet to navigate a database recordset

 
Ranch Hand
Posts: 289
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am wondering what is the most practical way to use a MIDlet to navigate a recordset returned from a database. I have a servlet that accesses an EJB to obtain a recordset from a database. Then I am using a MIDlet to access the servlet and I am getting the information on the MIDlet ok. But it is only ok now because there is only one record in the recordset, but the full implementation will return hundreds of records, and I am imagining it is not practical to send all the records to the MIDlet at once due to space resource constraints on the midlet. Ideally, I would like to be sending one record at a time to the MIDlet, so that the the user goes to the next button by clicking a "next button". But how do I send one record at time from the servlet to the MIDlet?

any ideas?

Herbert.
 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should use both the input- and output-streams. For example, you send one record from the servlet. When this is received in the MIDlet, the MIDlet sends a code on the output stream. After the servlet has received the data, it can send some new data. Repeat until all data is sent.
 
Those are the largest trousers in the world! Especially when next to this ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic