Instructions below assumes you are using
- Android Developer Tools Build id: v22.0.1-685705,
- Eclipse Version: 4.2.1.v20130118 Build id: M20130204-1200
- JTDS 1.2.5
though things will work out other versions higher than this and possibly lower as well , its just to ensure a known state where things worked out.
So, once the JTDS is jar is download, first step is to include jar to your build path
Next, though it seems like a bug, go to order and Export tab and enable jtds
Since the database connection operation is networked related, all network operations should be in different thread away from the main UI thread, so use AsyncTask.
Working code is can be downloaded from here , read the code, it is well documented.
git clone email@example.com:alkber/AndroidByExample.git