0

I am developping an Android app with a sql server, when we try to get records out of the database, we can view them in the java console.

However, when we test our app on Android, the connection is null and we do not see any records?

We're using JTDS 1.2.5 to connect with the database. On Android we receive a SQL-exception when the app attemps a 'getConnection()'

enter image description here

enter image description here

Jelle
  • 1,020
  • 2
  • 13
  • 22
  • Posting the exception will help. Is your android device able to resolve the hostname of the database ? You cannot use `localhost` on the device, just in case your connect string uses that. – Deepak Bala Apr 15 '14 at 12:29
  • The server is on a VPN network wich the device has a vpn connection to.. Stack trace: see edit top post – Jelle Apr 15 '14 at 12:42
  • Show stackTrace and you approrach.. Only then anybody can suggest you something – Noman Apr 15 '14 at 12:49
  • http://stackoverflow.com/questions/8706464/defaulthttpclient-to-androidhttpclient This solved my question :D – Jelle Apr 15 '14 at 13:16

1 Answers1

-1

Could you please write the stack trace? It could be very useful in order to solve the problem.

Without seeying it I can suppose that maybe you've incorrectly loaded the SQL JDBC driver and for this reason the program is unable to load the class.

Alessandro Suglia
  • 1,907
  • 1
  • 16
  • 23