External connection to sql server by android application, C# xamarim

Asked

Viewed 459 times

-1

Good I am in search of information regarding which procedure to access a sql server database by android.

  • 1

    So, Daniel, okay? Welcome to OS Pt. Your question is a little vague. Change your question by saying what you have already researched and tried, it is easier to help you.

1 answer

0


In the case of mobile applications the database connection is slightly different from the one made with desktop applications.

For you to "chat" with the database through an application you need to create a server, which will intermediate between the database and the application. In case the server would have to be next to the database.

By the application you will make requests to the server that will perform the requested action, for example:

• If you want to fetch data (SELECT) you would have to create a routine (GET) on the server that will connect to the database, perform the search and then return the data from your search, advise returning the data in JSON form, and then in the application you treat this JSON.

• If you want to enter data (INSERT) you would have to create a routine (POST) on the server that will receive the application data and then connect to the database, perform the Insert and then return to your application whether it went all right or not, again I advise to send the data to the server using JSON.

Note: I advise using JSON because it is a light way of transiting the data and because all languages accept it.

You can create a service in windows that will work as a server, using C#, Pascal (Delphi), PHP, among others... Look for something like RESTFULL Web Service with JSON in the language you best understand.

  • Solved I found contents that gave me a path to the solution, can close the topic rsrs

Browser other questions tagged

You are not signed in. Login or sign up in order to post.