问题
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:
- I installed the FoxPro ODBC driver.
- Setup as Windows System DSN for the FoxPro ODBC driver.
- 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