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
Generating Xml File from SQL Server 2008
How to Find Fifth Highest Salary in a Single Query in SQL Server
SQL Performance of a Lookup Table
SQL Server Normalization Tactic: Varchar VS Int Identity
I Have a Delete-Insert Cte That Fails in a Strange Manner
How to Find Specific Value to Specific String Location in Different Strings
Select Items Like Records from a Column in Another Table
Combine Rows When the End Time of One Is the Start Time of Another (Oracle)
Stored Procedure Failing on a Specific User
How to Connect a Localdb from Visual Studio to the Published Azure Web App
Parsing Openxml with Multiple Elements of the Same Name
SQL Query: How to Create Subtotal Rows When There Is No Aggregate Function
Deleting Duplicate Records Using a Temporary Table