Reading a FoxPro 2.6 data with Java

吃可爱长大的小学妹 提交于 2019-12-05 01:20:56

问题


I'm trying to read a FoxPro 2.6 database using java to retrieve data from an older FoxPro based application to format the output better. I've tried using JavaDBF and xBaseJ with no success. Is there a common way to connect that would allow me to get this information into my Java application?


回答1:


It's been a long time since I connected to a FoxPro database from a Java application but this is what I remember having to do:

  1. I installed the FoxPro ODBC driver.
  2. Setup as Windows System DSN for the FoxPro ODBC driver.
  3. Then used the JDBC-ODBC bridge to connect to the FoxPro database.



回答2:


You can try JDBF: https://github.com/iryndin/jdbf

It works without ODBC, with DbfRecord class, you can read DBF file record by record.

When I created it the intent was to have ability to read/write DBFs on Linux boxes, since you have no ODBC drivers on Linux.

Recently support of MEMO fields was added by request of JDBF user. You can send you own requests, and I'll consider it for implementation.



来源:https://stackoverflow.com/questions/4818023/reading-a-foxpro-2-6-data-with-java

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!