posted 8 years ago
Assuming you're talking about connecting via a mobile connection rather than WiFi, the usual approach is to build a gateway that the device can access via HTTPS. The gateway would in turn talk to the DB via its native protocol.
I'll just mention in passing that J2ME is quite dead, and its later versions (JME 8, I believe it's called) is not used for phones, so I would advise not to use it for any new projects due to obsolescence.