Windows Phone 8 access to SQL remote Database - sql

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.

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.

How can I create database and web service on azure?

I working on my school project.My project purpose is movie rating application with ionic.When I will present my application on the phone.I need to get data on the internet.So I have to use cloud system for keep in web service and sql database.Oh also I will using sql database.I want to build database and web service on the azure.But its my first time for azure.How can I migrate my sql database to azure and how can I create web service in azure.Im rookie these things.I need a starting point.I searched on the web but cant find a good tutorial :(
If your SQL Database and WebService structure is not a requirement, you can also explore other options such as Mobile Apps. Mobile apps is a workload on Azure specifically built for such scenarios to connect with mobile devices and two way data communication. It uses what is called "Table storage" on Azure. You can start with that and later on move to a no-sql database such as DocumentDB for persistent storage and querying.
You can find a step by step tutorial below on how to create the Mobile apps and connect it to different platform such as Windows Phone, Android or iPhone. The link here is for Android. If you wish to use other platforms you can use the tab to switch to them. It will even give you a sample project that you can download and run directly which can get you started pretty quickly. I also have a blog post around this if you are interested.
https://azure.microsoft.com/en-us/documentation/articles/app-service-mobile-android-get-started/
Hope this helps!

Universal store app getting data from server

I want to build an app that gets data from a server and it displays it in xaml. I'm new to universal programs and in windows store apps in general. I haven't found anything useful yet as ms sql solutions require libraries that is not allowed for universal store apps :(
P.S.: The answer in how to connect sql server 2008 R2 with windows store application did not answer my question, but Jeffery's answer did.
You can’t connect to a MS SQL Server directly from the Windows App. The common way is host a data service and the app query the data through the REST API.
App -> data service (e.g. OData service) -> database (e.g. MS SQL Server)
In this case, you can deploy the SQL Server Data Service on IIS.
How to: Deploying OData Services using IIS & SQL Server
Then you use the HttpClient to retrieve the data from service.
Similar Question:
Windows phone 8.1 app connect with a database

How to move a windows .net runtime frontend application to the cloud (it uses a local sql server backend database)

I had a engineer design our .net application back in 2009, my guess is that it was coded using visual studio, and all I have is the installer application. We have been using it on our 1 or 2 local client machines very well for the past few years, but now I want to move this front end to the cloud. Instead of installing it as an application on our windows 7 machines.
It is a very simple application used in our small warehouse that keeps track of cargo/shipments etc. It uses Sql Server 2008 Express as a backend which is stored locally.
I know how to get the database in the cloud, their are many options for that, using Amazon or Azure, but how do i get the local client application to the cloud?
I dont have access to the visual studio code, i just have the runtime executable file..
I am sure there is no way to do this, and many of SO users will say i need to re-write the front end.
I have tried to contact the developer and they hav since closed down. Is their anyway i can run this in the cloud?
I welcome all options and solutions!
Thanks.
I believe you have two options for hosting this application:
If you are able to configure the database connection string, you could host the database in the cloud, and distribute the application to your end users. However, you've already stated that you know how to move the database, so I assume this isn't an option.
The only alternative is to run the entire application on a cloud server, and send the user interface to a client using terminal services. This makes it appear as if the application is running locally on the user's computer, while it is actually running on the server.
For an off-the-shelf solution to achieve this, you could consider using Microsoft's RemoteApp Azure service. I'm sure there are other similar offerings available.

Windows Phone & WCF

Using this tutorial: http://www.c-sharpcorner.com/uploadfile/UrmimalaPal/creating-a-windows-phone-7-application-consuming-data-using-a-wcf-service/
I have created sample/hello world application on the windows phone which basically gets data from a SQL Server. I am using the Emulator in Visual Studio and WCF to connect the mobile phone to the server.
What I want to do now is improve this simple application so that it is not on localhost. I want my WCF running on my machine, install the application on my actual phone and then, like, go outside my house and still get data from the server.
So Basically, I'm going to improve it so it doesn't just work locally, but via a connection from my mobile to the server and not just on the emulator.
Any ideas?
(Sorry for my excessive explaining. I'm new to C# and Windows Mobile so I apologise if i'm being silly).
Thank you.
For this, I simply made a normal WCF console application and ran it as a service using interfaces and applying them to services.
I was then able to see this service running in Windows.