An xBase (dBase) driver for windows .NET 2.0.
Currently allows reading and writing to dBase tables and dBase V dbv memo files.
Uses an internal indexing system. No COMIX support.
If you do download, please leave comments.
At the moment i have only implemented a class for dBase V tables.
Although i think all previous versions use a similar enough system that the class should work for any dbase version ....
except for memo fields
The memo functionality is limited to dBase V dbv files. It allows for full read/write of text and implements read of Clipper arrays
Clipper arrays are mapped to java arrays. These may be arrays of arrays.
using xBase; namespace xBaseTest { class xBaseTester { private VTable part; public testRecord(String dbfPath) { // Create the table reference this.part = new VTable("part", dbfPath); // open the db file this.part.openFile(); // set and build an index this.part.setIndexField("ARTNR"); this.part.buildIndex(); // Set some test variables for record data String article = "test"; bool locked = true; // try to find a record DbaseRecordData record = this.part.readRecord(this.part.findRecord(article)); if (record.getRecordIndex() >= 0) { // record was found ... // read a field article = (String)record.getField("article").getValue(); locked = (bool)record.getField("locked").getValue(); } else { // record was not found ... // set some field record.getField("article").setNewValue(article); record.getField("locked").setNewValue(locked); } // set a memo field record.getField("memofield").setNewValue("this is some text. \nAnother line."); record.getField("datefield").setNewValue(new DateTime()); // Save the updated / new record this.part.writeRecord(record); // Close the db connection this.part.closeFile(); } } }Donwload @ sourceforge