• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using a MIDlet to navigate a database recordset

 
Herbert Maosa
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.
 
Johan Karlsson
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic