Android Studio with SQL Server 2012 -


i need make generic app can used anyone. app connect directly ms sql server, within intranet/wifi donot need worry security risk, donot want use web service or need on server. new , have tried every option still can't connect sql android studio.

class.forname("net.sourceforge.jtds.jdbc.driver").newinstance(); string url = "jdbc:jtds:sqlserver://192.168.0.7/mydb;user=android;password=abcd;"; connection dbconn = drivermanager.getconnection(url);

please suggest easiest way connect, said used different people on different server need connect directly dynamics nav database without middle tier

can connect directly sql server android studio?

thanks comments

i found , worked

 if (android.os.build.version.sdk_int > 9) {         strictmode.threadpolicy policy = new strictmode.threadpolicy.builder().permitall().build();         strictmode.setthreadpolicy(policy); 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -