Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Excuse my ignorance but we've got an application that we'd like to sample out on a mobile app The app is a C#/asp.net application connected to our sql server database. If we are going to write an android application for this app how exactly does one connect to the sql server instance? I've tried to find many articles, some say via a web service others say jdbc drivers, etc. I don't know too much about this because we've never done mobile development.

If we were to write up a web service, is the web service simply responsible for connecting to the database layer and fetching records? Any examples would be greatly appreciated.

share|improve this question

1 Answer 1

You need to write and deploy a REST service which your Android app can communicate with. There are a number of ways you can accomplish that: ASP.NET MVC, Web API, WCF, etc. The REST service connects with the SQL Server instance.

The web service is responsible for what you want it to be responsible for. It can contain business logic, transactions, data lookup, whatever.

share|improve this answer
Hi Robert, what exactly does that mean, having no experience whatsoever in this type of environment the more details the better. –  JonH Jul 8 at 19:11
It means that your Android App will communicate over the internet with your web service, and your web service will communicate with the SQL Server locally. You'll have to figure out the details, as explaining how to do it here would fill a book. Have a look at the Web API articles on ASP.NET for a decent primer. –  Robert Harvey Jul 8 at 19:12
Ok I am on the web api link you posted I'll look into it. One issue we have is this application is a private application basically an intranet. –  JonH Jul 8 at 19:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.