func setMemoBuf(_ fieldno: Int, data: Data)

Function setMemoBuf() writes data to a memo field.
The content of memo file is stored in external file, usually with .fpt or .dbt extension.
First this function writes the data to this file and then it write a reference to .dbf file.
If you want to write down usual fields and memo fields, the right way is to write usual fields first, and then memo fields.
After this if you want to continue to work with the same record - re-read it.


{
    // your code
    dbf.clearRecord()
    dbf.setField(0, asString:"string value")
    dbf.writeRecord(0)
    dbf.setMemoBuf(2, data:memo_data)
    // your code
}