Is it possible to connect to mssql database from j2me cdc. Using Cr-eme jvm on a windows ce 5 device. Can I use the jdbc-odbc bridge driver? I tried adding this driver to my code and the only place I can find it is in rt.jar. I dont want to have to copy the whole jar to my ce device because it is rather large. Is there a way that I can just take out the odbc driver out?
yes of course, JSR169 is there !
have a look,
download JDBC Optional Package for CDC/Foundation Profile - Final Release (April 8, 2004) http://java.sun.com/products/jdbc/download.html
Maybe I am not understanding this correctly. With j2me cdc I have to connect to DB's using DataSource and not DriverManager. So for a mssql connection it would be:
DataSource ds = new SQLServerDataSource();
ds.setDatabaseName("DB name here");
But whenever i try to run this I get an exception that javax.naming.Referenceable is not found, its not part of j2me cdc. I am using the mssql 2005 drivers 1.1
Maybe I am way off track, any help would be greatly appreciated.