I have recently been working on a job with a client who gets their data from county data. The county data is contained in .dbf files. Every year the data is updated and my client will get a CD/DVD from someone containing the county data in .dbf format. Now the problem is that my systems have been developed to work entirely off of MySQL (that is not going to change) and I will not be working with this particular client in the future when he gets these annual data updates. So I need a PHP/Python/Ruby script that will convert the .dbf to MySQL once he has uploaded the pertinent .dbf files. All I need, is pointers to correct sources. I don't mind having to do a lot of coding. I just have absolutely no clue where to start. Thanks.

Recommended Answers

All 10 Replies

This doesn't solve the problem. I wanted a PHP/Python/Ruby script that could do this automatically for my client. I can't use the command line version, because I don't have a windows box, I have a linux box.

From the linked site

You can run the program in a batch mode using command line interface. Besides, it includes a DLL which you can use from your own application.

This would imply you may be able to run this as a utility from your own script and then run the result script within My
SQL to generate the data.

Perhaps you should read more closely before replying so rudely to someone who was merely offering a suggestion to solve your problem.

whoops, I forgot to say that I am working on a linux box, not a windows. Sorry about that. I edited my answer.

runs very nicely under php, on apache, in my application immediately after the uploaded dbf is verified for structure.

Sorry, as soon as I saw that it was an exe rather than a php script I immediately wrote it off. Didn't realize that you could use it in a php script. The problem is that I don't have a windows box to run EXEs or DLLs. Thanks for the prompt response.

Perhaps you can provide the client a small utility program they could run on their end against the new files to convert and upload the data to your server, assuming they are running a Windows OS.

Yeah, I could. But my client is on Mac OS X 1.5, Tiger not Windows. And even if they were on Windows, I couldn't guarantee that it would stay that way. A PHP script that is platform independent would be a lot better.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.