How to connect Sql Server Database from android app?

In android how to connect my app with sql server database which is present in an hosting account (example: "godaddy", "bigrock") , if this is not possible then is there any other way to connect my android app to an online database?

  • Answer:

    Android apps usually use a local sqlite database present on the phone. If you need to connect to an online database you usually do it through PHP/Python or any such language.

Suhas Grama at Quora Visit the source

Was this solution helpful to you?

Other answers

Firstly, these sort of questions are better off on stackoverflow. You'll get a lot better answers there, considering it was made for that purpose. I do not have any experience with sql server; but I have connected an android app indirectly to an online mysql database hosted on a free webhosting site Firstly, it is against common tradition to connect an android app directly to a remote database system and execute queries. The preffered way to do this is to call a online script from an android app to do this for you. You can create a php program which connects to the database, call it from the android app and pass parameters (by get or post method) and the script would execute as per the parameters passed and output the desired results. You can use a python script instead of php, however this is less common. So its: ANDROID --> PHP/PYTHON --> DATABASE Make sure to use an AsyncTask on the android side. Calls to the php program can be made by using HttpPost object and executing it. To obtain the output of the script, pass its result into an inputstream. P.S: Feels weird to be writing this on quora; in the future, use stackoverflow.

Manoj Madanmohan

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.