>> >2) LLFF, and programmatically interpreting the structure.
>>
>> I have to admit I forgot about that second option - I've only seen a .dbf
>> low-level manipulated once, so it's not an option I think of.
>>
>> It's still not going to be pretty... :)
>
>If you can guarantee the format of the file coming off of the server, it
>doesn't have to be all that pretty:
>
>m.lnInFile = fopen("That.Blasted.DBF")
>=fread(m.lnInFile,200) && Skip the header
>
>do while not feof(m.lnInFile)
>
> * Read in a single record
> m.lcFields = fread(m.lnInFile,m.lnRecordLength)
>
> * Parse the record into the individual values
> m.lcField1 = substr(m.lcFields,100,50)
> m.ldField2 = ctod(substr(m.lcFields,200,8))
> m.llField3 = (substr(m.lcFields,400,1) = "T")
> m.lnField4 = val(substr(m.lcFields,500,20))
>
> * And add them to a table to be checked
> insert into RealTable ( field1, ;
> field2, ;
> field3, ;
> field4 ) ;
> values ( m.lcField1, ;
> m.ldField2, ;
> m.llField3, ;
> m.lnField4 )
>
>enddo
>=fclose(m.lnInFile)
>
>--
This is fine, assuming that you can guarantee that the data structure of the .dbf is never going to change.
One field added in the middle of this after the routine is in production, and you're toast. (As you can tell, I'm a proponent of data dictionaries)