Showing posts with label How to connect and access SQL Database server from Android app??. Show all posts
Showing posts with label How to connect and access SQL Database server from Android app??. Show all posts

How to connect and access SQL Database server from Android app??

Recently I have tried to connect to SQL Database server which is in my local network machine. I can connect and access SQL server from my Android app. I did it in the following way….
1. First of all you need a JDBC driver library for SQL Server. As we know android library has only SQLite database driver. So first download an open source JDBC driver from this http://jtds.sourceforge.net/ site (I downloaded the Linux version).
2. Then import the jar file into your Android app.(jtds-1.2.5.jar).
3. Now just try this code by modifying according to your context