Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I work for a company whose point-of-sale service uses IIS servers tied to static IP addresses at each of our stores. My boss wants a better real-time stat tracker than what the point-of-sale service provides.

I would like to connect to these servers from a central location and retrieve the data. If possible, I'd like to be able to do so from Python, PHP, or Ruby. What are some recommended approaches for doing so.

share|improve this question
    
First, find the driver for the language of your choice. Thats really the first step for any database connection. Beyond that, its just another relational database. –  MichaelT Sep 24 '13 at 15:41
2  
Your question isn't clear - are you having problems finding the servers? Accessing and or interfacing with the MS SQL DBs? –  GlenH7 Sep 24 '13 at 15:42
    
The methods for accessing MSSQL should be very similar to the other databases; you just have to establish a connection first. There are libraries that will help you do that; see code.google.com/p/pymssql, code.google.com/p/pyodbc, github.com/rails-sqlserver/tiny_tds, etc. My Google searches were "Python MSSQL" and "Ruby MSSQL". –  Robert Harvey Sep 24 '13 at 15:42
    
@GlenH7 accessing/interfacing –  anwyatt Sep 24 '13 at 15:44
4  
This question appears to be off-topic because it is about implementation, not a conceptual programming topic. –  Robert Harvey Sep 24 '13 at 15:45
show 3 more comments

1 Answer

up vote 3 down vote accepted

The simplest way to expose a MS SQL Database to a remote client is to use WCF Data Services. Using Visual Studio, you can walk through a wizard that looks at the database and creates the service for you in minutes.

WCF Data Services exposes your data using an open protocol called OData. There is a consumer library for Ruby that will consume an OData service and allow you to do whatever you want with it.

share|improve this answer
    
This is the simplest way? Or are you suggesting it because it's the latest and greatest? –  Robert Harvey Sep 24 '13 at 18:39
1  
It's the most straight forward in that it involves the least amount of custom coding. You literally have a service up and running in minutes. –  Mike Brown Sep 24 '13 at 21:10
    
@MikeBrown This sounds very cool. I was able to get pyodbc to work, but if I I can use this with Ruby instead I think I would prefer that. I'll look into it for sure. Thanks! –  anwyatt Sep 24 '13 at 21:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.