JDBC connection in Android

I have successfully connected to MySQL, Oracle and SQL Server directly from an Android device using JDBC and the regular type 4 drivers used for desktop Java applications for the respective databases.

Just search for a desktop JDBC sample. The same code works without any modifications on Android. Make sure you add the .jar file of the driver to the project in Eclipse. The compiler will automatically convert the .jar driver into Dalvik compatible package.

Leave a Comment