Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Accessing DBF's Remotely

Accessing DBF's Remotely

Accessing DBF's Remotely

I have recently done a lot of development involving sending and retrieving data to a remote server using HTTP Requests in JSON format.

I have some windows tablets that our techs use in the field to access the VFP database remotely over a VPN. So what would be great is if I could get these tablets to access the VFP database in a similar way using HTTP requests, instead of creating a direct connection as it does over the VPN. I can see a lot of advantages for this including retiring the windows tablets in favour of Android devices in the future.

I have very little idea of what is needed to make this happen.
Has anyone done anything like this and can provide some direction?

With regards


RE: Accessing DBF's Remotely

VFP9 in fact comes with all tools needed to create VFP based Soap services. Those were (are) XML based, the principle of a JSON REST API is actually even simpler.

There is no general DBF REST API I have heard of, but maybe just because it's easy enough to establish running VFP on a Web server with one of the solutions made for VFP on the web. Rock Strahl's Web Connection is maybe the most used library in that aspects, exists for very long, is very stable and the latest release I see on https://webconnection.west-wind.com/ is from September this year. Just like VFP itself it's not under further development, but Rick obviously still serves with maintenance releases.

The page also mentions "Create JSON REST Services". If I'd not want to dig into the details of foxisapi (part of VFP Samples) I'd go for that and base my JSON Rest API on it.

Bye, Olaf.

Olaf Doschke Software Engineering

RE: Accessing DBF's Remotely

Thanks Olaf

RE: Accessing DBF's Remotely


Olaf ist correct, WestWind and Webservices would be best.

Depending on your needs there maybe other ways :

a) Command
Imagine "command directories", one for each user.
The user creates and transfer a request file (.txt with Ids to get from server,...), maybe even by using a simple ftp tool.
On a "server" a VFP program polls this directories for requests, analyses them and writes a response file (.txt, pdf, dbf, csv)
User gets this file via ftp or vpn connection and opens it with local excel/acrobat,editor ... on his tablet.

If the requests are simple, you do not even need a program on tablet, writing request file with text editor and transfering it with ftp tool is enough.
Maybe good old total commander is ok for both.

And the response tool, polling on a "server" is easily done in VFP.

b) Remote access
a full featured program in central office on a "server" and a remote tool like Teamviewer, Anydesk, remoteplus, on Tablets and server.
So programming stays in VFP database world.


RE: Accessing DBF's Remotely

Hi Tom,

Thanks for the tips
Option B has been suggested a few times but has been discounted -
• There is already a fully functional application on the tablets
• The techs are in buildings where the internet connection is unreliable (basements, stairwells etc)

Option A was something I previously thought about (Something on a similar style) at the time and still has some merit. I am thinking it would not be that hard to implement as we already have a VPN setup. It would solve the problems in the short term and give me some time to concentrate on JSON and REST, creating DBF & REST servers etc.

Because I would like to retire the windows tablets in favour of android phone or tablets, I am thinking that JSON and REST would be best moving forward.

I have looked at WestWind Webservices and yes that would perform most of the functions I need.


RE: Accessing DBF's Remotely

Just FYI:

It's not that hard to get the foxisapi.dll up and running, even with an Apache webserver (On a Windows OS, of course).

http://fox.wikis.com/wc.dll?Wiki~FoxISAPIexample is a good starting point.

Things to change/add to an Apache httpd.conf file:


ScriptAlias /cgi-bin/ "C:/path/to/webroot/cgi-bin/"
AddHandler isapi-handler .dll 
The comments in the httpd.conf file tell a bit more, especially not forgetting the ExecCGI in the Options directive to enable executing something via CGI, also refer to https://httpd.apache.org/docs/2.4/mod/mod_isapi.ht... which again points this out.

Notes: Apache works with slashes in path names, also on Windows. And really just set the isapi-handler to react to any .dll, you don't specify the foxisapi.dll here, just the .dll extension.

The method you define has to return http response text starting from the Response Headers and continuing with the response text, that doesn't have to be HTML, can also be JSON, of course.

I still think web connection will make it easier especially not to fiddle with all the HTTP protocol details yourself. The interfacing with foxisapi.dll seems a bit outdated, it creates an INI-file, that you get as parameter and that contains informations a usual web script would know as server variables, the major input, either the URL parameters of a GET request or the request body of a POST request come in the first parameter of the COM Server method you define, in the wiki example the lcFormVars variable. And that could be a VFP script your server executes with EXECSCRIPT or anything you want the vfp server to execute.

Bye, Olaf.

Olaf Doschke Software Engineering

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close