How to transfer data from FoxPro to MySQL

I have a database in .dbf format (FoxPro).

  • How to get data from FoxPro using Java?
  • If the data can be transferred to MySQL, how to do the conversion?
+4
source share
6 answers

Taking data in intermediate formats seems erroneous, because there are restrictions with memo and CSV fields or Excel files.

If you are interested in a more direct approach, you might want to consider something like the โ€œVFP2MySQL Data Loaderโ€ or โ€œStru2MySQL_2โ€ written by Visual FoxPro developers. Search for them on this download page:

http://leafe.com/dls/vfp

DB-Convert ( http://dbconvert.com/convert-foxpro-to-mysql-sync.php ) is a commercial product that may come in handy.

Rick Schummer, VFP MVP

+5
source

You can use XBaseJ to access (and even modify the record) data from FoxPro databases directly from Java using a simple API.

This will allow you to have two applications (the old FoxPro and the new Java one) side by side, constantly synchronizing data until the new application is ready to replace the old one (for example, many times clients still freeze and trust their old application for some more time).

+3
source

Do you have a copy of FoxPro? You can save the database as an HTML file if you want. Then, from HTML, you can save it in any format. I recently did this to save a FoxPro table as an Excel table (not what I suggest using for Java code). If you plan to use Java as soon as you have access to data, why not use one of the native Java storage types?

+2
source

I assume that you do a CSV export of your FoxPro data and then write a small Java program that takes CSV as input, this is your best bet. Writing a program that connects to FoxPro and MySQL in Java is unnecessarily complicated; you are doing a one-time migration.

By the way, PHP could do a great job of embedding data in MySQL. The main thing is that you get your data in the MySQL schema, so you can use it in your new application (which I assume in Java).

+1
source

I worked on the same project once when the project was completed with FoxPro, and then we ported this project to Java with MySQL.

We had data in Excel sheets or .txt files, so we created the tables as an exact copy of FoxPro data and transferred the data from Excel / CSV / txt to MySQL using the Import Data function.

As soon as we do this, I think that you can take care of MySQL Data later.

But remember that the work will take some time, and we need to be patient.

+1
source

Two steps: DBF => CSV and CSV => MySQL.

To convert DBF (Foxpro tables) to CSV, the link below helps a lot

http://1stopit.blogspot.com/2009/06/dbf-to-mysql-conversion-on-windows.html

CSV => MySQL MySQL itself supports the CSV (or) import option for reading a csv file, this link helps http://www.csvreader.com/java_csv.php I read the CSV file using Java CsvReader and inserted records through the program. For this, I used PreparedSatement with Batch, the link below gives samples for this http://www.codeweblog.com/switch-to-jdbc-oracle-many-data-insert/

+1
source

Source: https://habr.com/ru/post/1308449/


All Articles