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?
posted 12 years ago
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.
I am going to test your electrical conductivity with this tiny ad: