AIyer
12-25-02, 12:13
| Hi everyone! I was wondering, does anyone know of any web-sites where they, in some detail, discuss the opening and editing of a dbf file, preferably in c++, but any other language is fine? I am trying to open and read a dbf file (oddly enough) and am having no end of difficulty in even understanding the file format. ie, there are three structures, the table file header (ok, the main header of the file, little difficulty there), the Table Field Descriptor (I take it this is the section where columns are described), the field descriptor array (sorry? What is this used for??) and the database records (I take it, the actual data of the file!). And ideas if this breakdown is correct? Finally, when I check my version number, using c++, and this snippet of code <snip> ifstream inFile("pat.dbf", ios::in|ios::binary); unsigned char dBV = 0; unsigned long id2 = 0; inFile.read(&dBV,1); // byte 0 id2 = (dBV); cout << "Raw value: " << (id2) << endl; the result is, on running: Raw Value: 48 Which seems to imply that the version is 0! However, some freeware dbase editors CAN open the file - so which version are they using? Do versions really matter? Cheers Andrew PS I ma assuming the the version is zero as bits 0 - 2 are the version bits, and they are zero in the number 48... |