Quick Utility to Compare DBF Schemas

I recently revisited a project that I had dropped about 6 months ago. The client sent me an updated batch of data to work with, and I remembered the first thing I needed to do was massage the new data to get it back to where I could work with it again. The problem was, I couldn’t remember what all I had to do to it.

So I needed to compare the new data’s schema with the old, and I was certain that there was a utility for FoxPro that could do that. This product has been out there for more than 30 years now, so there must be something right? Well I couldn’t find anything, so I decided to write my own class to do that and now I’m going to share it with you.

In a nutshell, this class serializes (by default, using FoxBin2Prg) the schema (including indices) for every table in either two folder or two DBCs [I guess it could be programmed to do one of each easily enough but it doesn’t yet] to two text files, and then runs those text files through a 3rd party diff tool (in my case, the unparalleled Beyond Compare]. It’s set up to be flexible enough to easily change which serializer or diff tool you use though. In fact the whole class is only 140 lines of code (including white space).

You can find the project here. If you’ve got ideas for improving it, please either add them to the project and do a Pull Request, or just comment on github.


Posted

in

by

Tags:

Comments

One response to “Quick Utility to Compare DBF Schemas”

  1. jl Avatar

    please share the program to compare DBF scheme

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.