0

I want to connect to my Azure DB from Android. From Android side im using JDBC:

Connection con = ConnectionJDBC.connectionClass();
String query = "SELECT * FROM mytable";
Statement stmt = con.createStatement();
stmt.executeUpdate(query);

From azure side, my server is normally up and running and the firewall settings allow IPs 0.0.0.0 to 255.255.255.255. Everything else is unchanged.

That also works for most WiFi networks over which I made the request. However, it doesn't work for my university's WiFi (specifically ETH Zurich), con will just be null. Does someone know what the problem could be? I think it lies in the configuration of the Azure Server but I don't know what else I could change.

f.k
  • 85
  • 2
  • 9
  • 1
    Related: [JDBC vs Web Service for Android](https://stackoverflow.com/q/15853367/295004). Similarly any university/corporate network should have firewalls to blocks lots of stuff unless specifically granted. – Morrison Chang Jun 10 '19 at 16:29

1 Answers1

0

Please see JDBC vs Web Service for Android, as suggested by Morrison Chang: JDBC should not be used and is sometimes blocked. Instead create a mobile app service in Azure (they will change the name to web app service), and connect to that server, as suggested here: https://learn.microsoft.com/en-us/azure/app-service-mobile/app-service-mobile-android-get-started

f.k
  • 85
  • 2
  • 9