pheeper
pheeper

Reputation: 1527

Creating a REST web service between Excel and Azure SQL

I have a couple of Excel macro based programs I've developed for clients where I use Access as a backend database, but want to move to an Azure SQL server for numerous reasons. I've setup the Azure SQL server and connected Excel, however it dawned on me that since Azure requires each IP address be added to the firewall this won't work if a user wants to access it from outside their office.

After hours of research it looks like the best option (other than running an Azure SQL VM) is to create a WCF or REST web service between the two objects, however I'm not too familiar with this and need a little help. So a couple of questions here:

1) Am I thinking about this the right way?

2) Can this be hosted on Azure as well?

3) How do I go about doing this? Even pointing me in the right direction would be helpful

4) With some HTML/CSS and Python experience, and a lot of VBA and R experience, how hard is this going to be to pull off?

Upvotes: 0

Views: 479

Answers (1)

Alex Belotserkovskiy
Alex Belotserkovskiy

Reputation: 4062

Yes. It is not a very best practice to give your customer or client direct access to the database. The broker like a REST service is the way to do that, yes.

The simplest way would be to use Azure Mobile Apps as it is the way to have that kind of a broker that will be automatically created and set up to access your database in SQL Azure. You may see the description of the workflow when using Mobile App in my SO answer here. Basically:

1) You create Mobile App on Azure dashboard

2) You create the data connection to your SQL Azure

3) You create Easy Tables for Mobile App

4) Now, you have the simple API like GET/POST/etc, and every operation is connected to the table in the SQL Azure. For example, GET can be used for retrieve the data, POST for insert, etc.

The best way to understand what Mobile Apps are is to use the official documentation hub.

Regarding "how hard" - for your scenario, it should be very easy as most of the operations are performed on the portal, and for the client you need to provide the application that will invoke REST actions and show the result. All of these steps are described on the link above, and, as it is the REST API, you may use that from anywhere with corresponding capabilities, Python included.

Upvotes: 1

Related Questions