This code snippet assumes that the query is already open. It puts " around strings and uses a comma for the separator, and dumps each record as a new line in a TMemo component.

[pascal]
var
fieldLoop : integer;
temp : string;
begin
while (not qry.eof) do
begin
temp:='';

for fieldLoop:=0 to qry.fieldCount-1 do
begin
if (temp<>'') then
temp:=temp+',';

if (qry.Fields[fieldLoop] is TStringField) then
temp:=temp+'"'+qry.fields[fieldLoop].asString+'"'
else
temp:=temp+qry.fields[fieldLoop].asString;
end;

memo1.lines.add(temp);

qry.next;
end;

end;
[/pascal]

Its probably not perfect in that there are possibly other field types that should be wrapper in quotes, but its a start.