Contact US

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

MySQL or VFP database

MySQL or VFP database

MySQL or VFP database

Hello colleagues!

Ten years ago I bought the book "MySQL Client-Server Applications with Visual FoxPro", published in 2007.

I have an application in VFP 9, using program (EXE) and files (DBFs) in the same folder. Many users access them in the server through PC terminals.

Now I am going to put the application in the cloud. So, I understand I have to make a change: only the database files will be in the cloud and every PC terminal accessing the files (using Windows Remote Desktop connection) will have the application file installed (EXE).

May I use the book to change my DBFs file to MySQL, or is it not a good approach anymore?

Or is the VFP database good enough for the cloud?

Thank you,

RE: MySQL or VFP database

You'll get several different opinions on this. My own view, for what it's worth, is that there is little point in simply moving your data from DBFs to MySQL (or to any other back-end database) unless you also redesign the application to make it a true client-server app.

I'm not familiar with the book, so I can't comment in detail. But, in general, to take full advantage of a client-server architecture, you need to arrange things so that, as far as possible, all record selection is done on the server. This is a key point.

To give an example. In a typical DBF-based application, if you want to search a table for records that meet some criteria, yuo have to bring the entire table across the network, so that your app can examine each record in turn. You can mitigate that somewhat by using indexes, but that still involves bringing at least some data to your workstation in order to decide whether or not to keep it.

In a client-server application, on the other hand, the testing of the records is done entirely on the server, perhaps via the WHERE clause in a SQL SELECT. Only the records that meet the criteria are then sent across the network. Not only is this faster for your application, but it reduces network traffic in general, for the benefit of all users.

Clearly, you will need to re-design your app to achieve this. It's not just a question of replacing tables with remote views or cursor adapters. How difficult that will be will obviously depend on your existing design.

I hope this helps. If you care to tell us a bit more about your app, we can no doubt give you more specific advice.


Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: MySQL or VFP database

In short, you can't simply USE http://mydomain.com/mydatabase/my.DBF

It'll need more than just loading up the DBFs into the internet to have them available world wide. In short, you need a WAN (wide area network) to continue using DBFs.

MySQL is the easier solution to get data into the cloud, as any simple hosting is capable to run a MySQL server and thus have data "in the cloud" accessible from anywhere with internet connection. The hard part with this is as Mike said, you can't easily reuse your code to use a database server instead of DBF files.

The book you have is good enough, I guess, because VFP didn't change. You'll likely need to adapt things for newer MySL versions, as you shouldn't use an old server version.


RE: MySQL or VFP database

Yes, Mike, your comments have helped me, so that now I am thinking about to take ALL files of an application that I have in a server (EXE, DBFs, FPTs, IDXs) to a folder in the cloud.

This way, a user process the application (EXE) in the server located in the cloud and make all process there, so I will not need to make any change in the programs.

Indeed I had already done this to one of my applications, for testing, and it has worked fine and fast (using Windows Remote Desktop connection). Using a third-party framework I tested, I could even access the application from a browser!

Of course this isn't a client-server application, but what the problem if it works?

What is your opinion about this approach?

Thank you,

RE: MySQL or VFP database


I want to use VFP in the cloud in the same manner I have just seen in a post in a January post from Dan Olsson, a few minutes ago:

Quote (Dan Olsson)

I have about 50 places around Sweden, all of them set up similarly. EVERYTHING is on the server and clients only have a shortcut (via a network drive) to the EXE on the server.

Thank you,

RE: MySQL or VFP database

Then it is not a question about VFP anymore, this is using Terminal Server as a basis and that works for any EXE with whatever it needs, i.e. DBFs in your case.

This solution requires server hardware that can support as many as necessary parallel users aka usersessions and enough client licenses to connect.

Any normal Desktop Windows OS (say Windows 10 or 11) can allow Remote Desktop connections, too, and act as a server. But only for one user at a time. If that's enough you could just enable incoming remote desktop connections this way:

And overall, that's not at all a VFP related question anymore, but Windows administration about Terminal Server with requirements of hardware resources - mainly RAM and hdd space - and licensing.


RE: MySQL or VFP database


now I am thinking about to take ALL files of an application that I have in a server (EXE, DBFs, FPTs, IDXs) to a folder in the cloud.

As far as EXEs are concerned, there are certainly benefits to keeping them in the cloud (compared to having a copy on each local workstations) - not least of which is the ease of updating. But you will suffer a noticeable hit on performance. In a typical VFP application, the system is constantly accessing the bits of the EXE that it needs to execute, which means a lot more network traffic.

I'd go as far as to say that keeping a copy of the EXE on a local machine is one of the surest ways of improving overall performace of the application.


Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: MySQL or VFP database


what you're saying is correct if think of it literally as SitsMasstec says as a folder in the cloud as if it was a file share and running the EXE would then run it locally like with a file share in the LAN having EXE and related files in it.

That's not practical, indeed, but also not what Dan Olsson did.

SitesMasstec, to get back to my post, I came back here to add to that. I said:

Quote (myself)

But only for one user at a time

You can enable incoming remote desktop connections on each workstation of employees so they can use their actual workstation computer from home as a Home Office solution and then multiple users can use an application just like when they are in the office using their workstation, so this can work for multiple users, with the downside of each workstation needing to be on 24/7 to allow the connections to them at any time. Therefore usually a Terminal Server is used as a more practical solution.


RE: MySQL or VFP database

Yes, Chriss, for now the matter exceeds VFP, sorry. Just for finish the matter:

I understood that Dan Olson access a server in the cloud from 50 different places across Sweden. I think those "50 different places" access the server through Windows Remote Desktop, aren't they?

I think every terminal must have VFP Support Library installed.

My application will be in a server in the cloud, and only 6 people from different locations will access the application. Sometimes 3 or 4 people will be using the same application at the same time. Is it not the same we do today in a LAN environment? Why Chriss says "one user at a time"? Just because of low speed?

Thank you,

RE: MySQL or VFP database

Quote (SitesMasstec)

Why Chriss says "one user at a time"? Just because of low speed?

Reread, please. Just visit the link I gave you and you'd see for yourself. If you would enable remote desktop connections to a Workstation having a Windows version for clients (Win 8/10/11) and not a terminal server, you are limited to one user at a time.

If you use a Terminal Server, on the other hand, it depends on the server hardware ressources and client licenses what number of concurrent user sessions you can support. 6 users is not a big problem.


RE: MySQL or VFP database

Quote (SitesMasstec)

I understood that Dan Olson access a server in the cloud from 50 different places across Sweden. I think those "50 different places" access the server through Windows Remote Desktop, aren't they?

No, sorry you have misunderstood that dazed

RE: MySQL or VFP database

Hello Dan!

May you please say how this (many users from different locations accessing the server) is done?

Terminal Server has to be installed in every terminal that access the Server (where de .EXE and DBF are stored) or just in the Server?

Until now I have applications being accessed in a LAN. Now I will have to put the server in the cloud.

Thank you,

RE: MySQL or VFP database

I run a couple of applications using RDP (Terminal Server) so that remote people can access them.

The server just has to have the role enabled, and licensing configuration established - along with enough client access licenses
to support what you want to do.

I strongly suggest you read this, to get yourself going.


The client machines will most likely have RDP installed and they are easy to configure.

RDP is a favoured attack vector for windows servers (as they already know the name of one user
'Administrator'), so it is normal to limit the access via the firewall to just the required
IP addresses - or to use a VPN.

I have customers who have local networks who are happy to run my apps via RDP on my (rented)
servers, and I also have customers who use this approach for their remote workers and
as a 'last ditch' fallback in the event of their offices burning down or their being a worldwide


Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.

There is no place like G28 X0 Y0 Z0

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