Android with SQL Server 2008

Connecting android app to Microsoft SQL server 2008

add these code

StrictMode.ThreadPolicy policy=new StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);

Connecting android with MS SQL SERVER 2008

here are some similar questions asked (an answered):

  • android MySQL connection
  • How to connect to a MySQL Database from an Android App?

Even though those are for MySQL, it should work for MSSQL by changing the engine or the driver's use to connect. Usually, the approach is to expose some limited level of modification through a web service. Still, nothing is stopping you from directly accessing the database, albeit depending on the case, could pose a security risk.

Main Reasons the web service approach is taking:

  • Performance
  • Security
  • Best Practice
  • Separation of concerns

An exception is if you want to enable direct access because you're building a sort of database client through mobile.

How to connect Android device to SQL SERVER 2008 R2 on PC

Make a webservice which gets invoked on Apps request.



Related Topics



Leave a reply



Submit