Access SQL database from Android? - sql

I understand that to access a SQL database from Android I need to create a web service that will run on the SQL server and will process requests from the Android application, what I need to know is how to create this web service and how to access it from Android.
If anyone can point me in the right direction then this would be greatly appriciated.

On the client side, use Apache Commons HttpClient to communicate with the web service. It's bundled with the SDK.
Don't forget that you can also use a local DB.
How you create the web service server-side depends on your environment and has nothing to do with Android itself.

Related

How to connect NativeScript application to SQL database?

I just started creating an application using NativeScript using Angular. I created a database using Azure and SQL. I'm really confused on how to connect the two though and can't find too much on it. Could someone help me out? Thanks!
None of the mobile apps connect to SQL database directly, you will expose REST services which will act as a middle man between your mobile app and database.
If you don't have a backend setup, then other option is to try one of the mobile backend services, Firebase for instance.

IBM Mobile First Direct Update from local machine

I am working on a project in IBM MobileFirst. My question is regarding Direct Update.
Is it possible to receive direct update if I build/deploy my application from one machine to Mobile and point the server that is in another machine (Production machine)?
If not what should I do to receive Direct Update from Production machine.
Thanks in advance.
Your application can point to any MobileFirst Server you want, as long as that server has the application's .wlapp file deployed on it in order to register the application there (assuming also the server is properly configured to serve that application (adapters, authenticationConfig.xml, etc).
You can then deployed updated .wlapp files to that server, and it'll serve Direct Updates to registered applications.

How to save data from visual studio apache cordova project to sql server throght web api?

I m new to apache cordova project in visual studio, i have doubt that how system can save data in my sql server from this project. I have already created web API to save data to sql server. How can I call that from apache cordova visual studio project.
Any reference links will be help full.
I made a cordova plugin to access directly to an external SQL Server. Here is the link https://github.com/SergioDosSantos/cordova-plugin-sqlserver.
Android and iOS are supported.
there are 2 options:
in the index.html that is created by the cordova project, use 'ajax Post call' webapi or webservices with Cors enabled and json datatype.
create a signalr Server winform or console or service, call this signalr Server in the index.html using JavaScript with Cors enabled. then inside your signalr Server, call any dll or webapi or webservices, whatever you want.
I would suggest option 2, since the signalr Server can also initiate a call to the index.html's JavaScript functions, so it's two way!

Windows Phone 8 access to SQL remote Database

I'm trying to develop a WP8 app, and I have a free online sql server (not windows azure).
How can I Access the Database from the phone app?
I tried a local WPF sevice and it worked, but it won't help if I'd like to upload the app to the store.
Thanks for the help!
As far as i'm aware, you can't access the database directly, you need a proxy web service for this, i recommend you to look at OData, REST APIs and also to JSON or XML to transfer your data from the database to your app.

Are there any special deployment requirements for a REST Service to Azure?

I have written a REST service with windows azure using the WCF Rest Service Templates.
Locally everything runs fine. However when I deploy to Azure then all my requests return 500 Server Error.
Are there any special deployment requirements for a REST Service to Azure ?
I don't see anything in my project that points to local.
I left everything in the web.config set to defaults.
You should remote desktop into the Azure instance and check the Application Log. See this post on how to connect to the remote server instance. Most likely you are missing an assembly reference.