-1

How can I connect my local database in my application? I have a database which contains a book. I have to display it in my application in J2ME

gnat
  • 6,213
  • 108
  • 53
  • 73
  • 1
    What database? What have you tried so far? Without knowing anything about your application or what you're using, it's difficult to answer. – Deco Feb 08 '12 at 08:08
  • i use rms for all DataBase Operation but now i have a already built db and i want to use in my project – user1194148 Feb 08 '12 at 09:26

3 Answers3

1

Basically, in JME, an app can create a database which is a file stored in the RMS. Actually, there are several APIs that can help you in creating a Java ME database: Is there any option for local database like Sqlite for j2me - CLDC devices?

Anyway, I think the data in a sqlite database is not easily accessible to a JME app. It is not impossible but it, maybe, is complicated. Honestly, I don't know anyway to do it.

Community
  • 1
  • 1
yoninja
  • 1,952
  • 2
  • 31
  • 39
0

You have to create a server application where you access to database. Also your J2ME has to communicate with your server application for getting Data you want to display (Use HttpConnection Class).

Lucifer
  • 29,392
  • 25
  • 90
  • 143
frayab
  • 2,512
  • 20
  • 25
-1

In Mobile Application, you can not directly make connection with local or remote database. To Make Connection with Database , you need a middle tier called a web service. You can create web service in any platform like Java-Servlet, .net or in PHP. See this is a very simple example to work with MySql Database.

Lucifer
  • 29,392
  • 25
  • 90
  • 143