If you want to create and access a database in MIDlet, please consider RMS in MIDP.
Some cell phones have the native Contact Database and Calendar Database which can be accessed by JavaPhone API. However no every phone supports JavaPhone API or JSR 75. Nokia 6630 supports JavaPhone API.
If you want to run the database on server side, you can create a HttpConnection in the MIDlet to access the database through the servlet, JSP, ASP or other, which is running on the server.
Hi, thanks for that.
i am trying to do a midlet which can access the database from the servlet. i wish to update the database every minute from the servlet (in a FORM type) and the midlet will be able to download or retrieve the updated data from the database and display it in the screen of the phone.
do you have any idea how to do this?
MIDP API does not support Servlet. I guess that you have the servlet running on server side to access database. Then you can use a HTTP connection in the MIDlet to send requests and get responses to and from the servlet which accesses data in the database.
Please refer to the MIDP specification for how to use HTTP to
retrieve the data from the database on server side and display it in the screen of the phone, available from:
sorry to trouble again.
about the server to access the database instead of the MIDlet, is there available example or tutorial on how to do that?
Or will you be able to post some code on how to do this? i not sure how to write the servlet to enter data in a FORM to a database, and how to write the servlet to access the same databases ?
thanks a lot...
You can use JDBC in the servlet to access Database.
Or if you are using J2EE server, you can servlet + EJB to access database.
You can find all kinds of free J2EE and JDBC tutorials in the Internet. The tutorials have many samples.