function RecordToCSV(dbf :integer; qt, dlm: string): string;
RecordToCSV returns the last read record in CSV format.
You can define a quotation mark and delimiter.
var
dbf :integer;
r :integer;
begin
dbf := OpenBase( 'filename.dbf' );
if dbf <> 0 then
begin
for r := 0 to RecCount(dbf)-1 do
begin
ReadRecord(dbf, r);
WriteLn( RecordToCSV( dbf, '"', ',') );
end;
CloseBase(dbf);
end;
end.