如何将数据从 FoxPro 迁移到 MySQL

发布于 2024-08-31 01:15:12 字数 111 浏览 10 评论 0 原文

我有一个 .dbf (FoxPro) 格式的数据库。

  1. 如何使用 Java 从 FoxPro 检索数据?
  2. 如果数据可以迁移到MySQL,如何进行转换?

I am having a database in .dbf (FoxPro) format.

  1. How to retrieve data from FoxPro using Java?
  2. If the data can be migrated to MySQL, How to do the conversion?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

破晓 2024-09-07 01:15:12

将数据转换为中间格式似乎存在缺陷,因为备注字段和 CSV 或 Excel 文件存在限制。

如果您对更直接的方法感兴趣,您可以考虑“VFP2MySQL 数据上传程序”或“Stru2MySQL_2”之类的东西,它们都是由 Visual FoxPro 开发人员编写的。在此下载页面上搜索它们:

http://leaf.com/dls/vfp

DB-Convert ( http://dbconvert.com/convert-foxpro-to-mysql-sync.php )是一个您可能会发现有用的商业产品。

里克·舒默,VFP MVP

Taking the data to intermediate formats seems flawed as there are limitation with memo fields and CSV or Excel files.

If you are interested in a more direct approach you could consider something like "VFP2MySQL Data Upload program" or "Stru2MySQL_2", both 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 you might find helpful.

Rick Schummer, VFP MVP

遇到 2024-09-07 01:15:12

您可以使用 XBaseJ 直接从 Java 访问(甚至修改写入)FoxPro 数据库中的数据,方法很简单API。

这将允许您通过不断同步数据来并排使用两个应用程序(旧的 FoxPro 和新的 Java ),直到新应用程序准备好替换旧应用程序(例如,很多时候客户仍然坚持并信任更多应用程序)他们的旧应用程序有一段时间了)。

You can use XBaseJ to access (and even modify write) data from FoxPro databases directly from Java with simple API.

This would allow you to have the two applications (the old FoxPro and the new Java one) side by side by constantly synchronizing the data until the new application is ready to replace the old one (e.g. many times the customers still hang on and trust more their old application for a while).

离不开的别离 2024-09-07 01:15:12

您有 FoxPro 的副本吗?如果需要,您可以将数据库另存为 HTML 文件。然后,您可以从 HTML 保存为任何您想要的格式。我最近这样做是为了将 FoxPro 表保存为 Excel 电子表格(并不是说我建议将其用于 Java 代码)。
如果您计划使用 Java,那么一旦您可以访问数据,为什么不使用 Java 的本机存储类型之一呢?

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 to any format you want. I recently did this to save a FoxPro table as an Excel spreadsheet (not that I'd suggest using that for your Java code).
If you plan on using Java, once you have access to the data, why not use one of Java's native storage types?

终止放荡 2024-09-07 01:15:12

很久以前我就从事过同一个项目,该项目是使用 FoxPro 完成的,然后我们将该项目迁移到使用 MySQL 的 Java。

我们的数据位于 Excel 工作表或 .txt 文件中,因此我们创建了表格作为 FoxPro 数据的精确副本,并使用导入数据功能将数据从 Excel/CSV /txt 传输到 MySQL。

一旦我们做到了这一点,我认为您可以进一步关注 MySQL 数据。

但请记住,工作需要一些时间,我们需要耐心等待。

I worked on the same project once long back where the project had be done with FoxPro and then we migrated that project to Java with MySQL.

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

Once we did this, I think further you can take care from MySQL Data.

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

遗失的美好 2024-09-07 01:15:12

我认为将 FoxPro 数据导出为 CSV,然后编写一个以 CSV 作为输入的小 Java 程序是最好的选择。用 Java 编写一个同时连接到 FoxPro 和 MySQL 的程序是不必要的复杂,您正在进行一次性迁移。

顺便说一句,PHP 在将数据插入 MySQL 方面也做得非常出色。最重要的是,您可以在 MySQL 模式中获取数据,这样您就可以将其与新应用程序一起使用(我假设是用 Java 编写的)。

I suppose doing a CSV export of your FoxPro data and then writing a little Java programme that takes the CSV as input is your best bet. Writing a programme that both connects to FoxPro and MySQL in Java is needlessly complicated, you are doing a one time migration.

By the way PHP could do an excellent job at inserting the data into MySQL too. The main thing is that you get your data in the MySQL schema, so you can use it with your new application (which I assume is in Java.)

滥情空心 2024-09-07 01:15:12

两步:DBF => CSV 和 CSV => MySQL。

要将 DBF(Foxpro 表)转换为 CSV,下面的链接有很大帮助

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

CSV =>; MySQL
MySQL 本身支持 CSV 导入选项(或)来读取 csv 文件此链接有帮助
http://www.csvreader.com/java_csv.php
我使用Java CsvReader读取CSV文件并通过程序插入记录。为此,我将PreparedSatement与Batch一起使用,下面的链接提供了示例
http://www.codeweblog.com/switch-to -jdbc-oracle-many-data-insert/

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

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

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

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文