I've started developing an android application which connects to SQLServer DB, I've successfully connected to the DB with this connection string :
ConnURL = "jdbc:jtds:sqlserver://" + _IP+ ":" + _Port + ";" + "databaseName=" + _DB + ";useNTLMv2=true;integratedSecurity=true";
But it works only if i try it on a device which is connected to the same network in which the server is connected because the IP i put in the connection string is 192.168.1.7. What should i do to make it work if I try it in another network ? I've tried replacing that IP address with the IP address which i got from What Is My IP but it wont connect.