J2ME Database
Handling
I am developing a J2ME application and have no idea how to connect it with the database. I tried it doing, as given in some books but was unsuccessful. I included the following code in the constructor of MIDLET class String url = "jdbc:odbc:db1";
I included the "javax.sql" package also, but the emulator does not recognise this package and an error message saying that "this package does not exist" . I would also like to know the use of TOMCAT server while developing a mobile connection or while accessing the database. plzzz help as soon as possible. Shane You seem to be having a bit of an architectural issue more so than a java/jdbc problem. If you do have a JDBC driver and a DB running on the device, you can connect to it... It's unlikely to be a JDBC-ODBC bridge, however. If you have a remote DB, the JDBC connection is probably an expensive way to connect from your device to the DB. Regardless, you have to have at least the database's driver installed on your device. As far as tomcat: what are you trying to do? Are you trying to create a web application that you can surf on your cell phone? Then, from tomcat's viewpoint, it's the same as developing any other web application, except, when you write your markup, it may not be HTML, but WML or CHTML, or some other markup generated by your JSPs/Servlets. Your web application will be connecting to the DB. Cheers, RZ
Do you have a Java Problem?
Java Books
Return to : Java Programming Hints and Tips All the site contents are Copyright © www.erpgreat.com
and the content authors. All rights reserved.
|