views:

204

answers:

2

I am busy with a project that requires me to read from a database and display certain results on mobile(J2ME). For example: I must list all customers in the database (SELECT * FROM CUSTOMERS) and i must display that results on mobile(J2ME). So some how i need to connect the mobile to the database.

How do i go about doing this? I really need help. I'm using Netbeans 6.5 and Postgres database.

Thanks in advance.

A: 

You need to use JDBC + PostgreSQL Driver. There is a good tutorial here.

Here here and here are articles about JDBC for J2ME. To be frank, I've never use JDBC on J2ME. I just used them separately. So try it yourself.

I gotta go to work now so good luck. :D

NawaMan
thanks, i'll have a look at that tutorial now.
sami
+2  A: 

You cannot directly - JDBC is not supported on J2ME.

The common way is to expose your database via web services (SOAP, REST, etc.) and connect to those from the J2ME application. BTW, netbeans has a neat tool that generates proxy and j2me client library to j2me devices (arrives with the mobility pack)

David Rabinowitz