Solved Foxpro IDE

Tbure90

New member
Local time
Yesterday, 19:50
Joined
Sep 23, 2024
Messages
15
I'm working with legacy software that was built with Visual Foxpro. While there is a Vfpodbc driver that will allow linking to and importing the data from the .dbf tables into Access, it is 32-bit and i have since been forced to upgrade to 64-bit Office and can no longer use this driver. On top of that, to use the driver I would have to install it and setup a DSN on every computer that would need to use any potential databases that would need to link/import these tables. I'm an engineer, not IT, and i don't have the time to set that up and manage it should there be issues in the future.

This isn't a big deal because the legacy software in question does have the ability to export tables to excel and i can link/import those no problem. My only issue with that is some of the databases I've built for my coworkers require multiple tables to be dumped out of our legacy software and some contain 100k + records so it can take a long time (and some of my coworkers aren't very tech savvy, to say the least, so they mess up the data dumps quite often unfortunately...). The ODBC driver was the only "solution" i found that would remove the need to manually dump out the tables into a format that access can use.

I know in Excel you can use Microsoft query, but i'm not sure if that can be automated.

My next thought is that maybe i can write Foxpro code that can export the .dbf files to excel and i can run a shell command to trigger that foxpro code file to automate the file type conversion that i want. The problem there is i have no idea where to find a Foxpro IDE to write the code file.

So that's the background of what I'm working with and leads me to the following 2 questions:

1. Can I automate Microsoft query or does anyone know of any other way (besides using the foxpro odbc driver) that i can automate dumping the .dbf files' contents into or Excel or directly into Access? Also i think i might still need the driver for this to work...


2. Does anyone know where to get access to a Foxpro IDE? Even if i could get access to one, will i be able to use it in a 64-bit system?

Any help is appreciated!
 
I run win11 64 bit and have VFP 7 and can use it with no issues.
 
I know in Excel you can use Microsoft query, but i'm not sure if that can be automated.
It can totally be automated
 
Yet again as with outher 'old' data sources., if you have access 2003 you can Import the data directly and then convert to format you can use in 64 bit (XMĹ).
 
Oh, that went right over my head, sorry :) Running too fast with scissors today
 
Oh, that went right over my head, sorry :) Running too fast with scissors today
Did you at least make sure you were wearing your PROPER running with scissors gear?
 
PM me and i willl give you a DBF Converter, for free.
 
I have an original CD of Visual FoxPro 9.0 Professional which has been sat on the shelf for years.
It says it is an upgrade but as I recall it installed Ok back in the day.
 
Excel should have the same problem with FoxPro that Access has since it also uses ODBC and will run into the bitness issue.

YOU would never be responsible for distributing the 64-bit ODBC driver. You would talk to your IT support and tell them what you need and THEY would distribute the required driver. The problem will be, how you define future users so that YOU or the system Admin don't have to remember each time a new user gets added to make sure they get the ODBC driver. I guess you could just leave a note in the App on an "Admin notes" form.
 
I was able to install foxpro from the link @Gasman sent. still haven't gotten a chance to mess around with it yet.

@arnelgp can i operate this converter using VBA? The whole idea is to automate the conversion, our legacy software already allows users to manually convert from .dbf to excel
 
Guys, just to give y'all an update i was able to write a .prg file and compile it into a .exe. I then used a shell command from access to convert the .dbf file to excel. Thanks a lot for the help! I'll go ahead and mark this as solved.

I did this on my c:\ drive, will test it out on a mapped network drive on a coworkers computer to see if it works on Monday and will update you.

From what i understand, as long as the runtime libraries (.dll) are located in the same folder as the .exe then no one should have to install anything and it should run just fine. Not sure if that holds true on a mapped network drive but i'll find out Monday.
 
@arnelgp can i operate this converter using VBA? The whole idea is to automate the conversion, our legacy software already allows users to manually convert from .dbf to excel
no, it won't run on VBA. I created a Portable version using Turbo Studio from the installation file.
 
Last edited:
i also found a program named DBF Viewer 2000.
this is x32 program, but has a command line that can
be called from access (using Shell) to Export the table
to another format (i.e. Excel or CSV) which can be later
exported to an Access table (using VBA ofcourse0.

this is it's documentation:
 

Users who are viewing this thread

Back
Top Bottom