ClearRecord fills the internal memory with blank symbols (blanks or zeroes).
You have to call this function before you want to fill fields with some information.
var
dbf :integer;
r :integer;
begin
dbf := OpenBase( 'filename.dbf' );
if dbf <> 0 then
begin
for r := 0 to RecCount(dbf)-1 do
begin
ClearRecord(dbf);
// some code
WriteRecord(dbf, r);
end;
CloseBase(dbf);
end;
end.