Tutorial :How to create a database connectivity sqlserver2000 through J2ME?


I want some helps from the professional people who know a lot in theJ2Me. I work on a mobile application that the user will be stored and retreve the data from the database using sqlserver 2000.

I am new in this area ( J2ME ) and I don’t know a lot, so I want help.

one more, j2me is not directly support the database connectivity for that purpose we can achive with the help of servlets. Insted of servlets can we use JSP's for databaseconnectvity.


There is no standard JDBC on J2ME.

The typical implementation of what you are trying to do is to have your J2ME client make HTTP requests to a remote server.

The body of the request is made up of your own data transfer and security protocol.

The remote server decodes the request body, creates an SQL request, runs it on SQLServer, encodes the result, sends it to the J2ME client as a reply to the initial http request.

The J2ME client is then free to decode and process the SQL request result in any way it likes.


Using servlets or JSPs is your call, you can use either. Also you need to ensure that you return only very minimal data, say maybe content of 20 to 50 rows depending upon the rows size. Dont send XML or other textual data, rather send them as a binary stream which you can create using the DataOutputStream class.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »