Question

I am looking for a library or some type of documentation on how to set up a Visual Foxpro app to receive HTTP requests. Any direction in this manner will be greatly appreciated.

Was it helpful?

Solution

I would start with West Wind Web Connection tool for Visual Foxpro. This will allow you to communicate over HTTP with any web server. They also have a limit free download so that you can test it before you buy it.

Click here to go to their site

OTHER TIPS

FoxPro itself cannot receive HTTP requests. FoxPro is a database application somewhere between mySQL and Microsoft Access; it doesn't have a server component.

However, you can connect to FoxPro from any programmatic web server which can speak OLE DB, ODBC, or even just COM. West Wind Web Connection does the latter, and has additional functionality for having FoxPro write output suitable for an HTTP stream.

If you're trying to make a web app using FoxPro, West Wind is a good direction to go. Conversely, if you just want to reference some data in FoxPro via an HTTP web service, you're better off writing your service in PHP or ASP.NET and having the latter connect as it would to any other database.

After some thought and research the easiest and quickest way to implement this is going to replicate the same functionality of receiving a HTTP request by having the web layer write to a file that the VFP application will constantly listen in on and when some type of text is present in the file it will execute its function accordingly and make an easy HTTP post back to the web layer with the given data.

VFP comes with an example IIS plugin called FoxIsApi. It allows you to expose VFP objects as urls. See http://msdn.microsoft.com/en-us/library/44b055ey(v=vs.80).aspx

Another approach is to expose your VFP application as a COM object and connect to it from NodeJS. NodeJS can than expose your methods as webservices. I've used https://github.com/idobatter/node-win32ole to connect the two.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top