This week's book giveaway is in the Cloud forum.
We're giving away four copies of The Business Blockchain and have William Mougayar on-line!
See this thread for details.
Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

J2ME and mySQL

 
Yavor Ivanov
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello. I am new to JME!

I am trying to create a MIDlet, which makes a request to a database, and gets the specific information back on the fly.

Can you give me any direction of how to start off the app? A link with tutorial would be just perfect!

Thank you!
 
ks goh
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
j2me itself can't connect to database.
you either need to have a servlet jsp php etc to connect to database.
or you can write a socket connection.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are also some products out there, like PointBase, which also have some J2ME solutions. But they cost money.

Mark
 
Miguel Aragues
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've developed an app which does more or less what you want.

What I've done is implementing Struts actions which retrieve the information you want from the DB (through JDBC, perhaps I should have used hibernate) and endorse this information to the request scope. Then I create a xml document and forward it to the j2me app embebed in a jsp.

In the j2me app you must use a xml parser, I've used kXML. You retrieve the xml document through an HTTP Connection, read it, do whatever you want with the data and show it on screen.

If you want to contact me, feel free to write to tig_cyber _AT_ gmx _DOT_ net and I can send you some code examples.

[ October 16, 2006: Message edited by: Miguel Aragues ]
[ October 16, 2006: Message edited by: Miguel Aragues ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic