1. I have checked the help, and it seems that ADO saveToFile only supports the
format of XML and ADTG(Advanced Data Table Gram, a proprietary Microsoft format).
Therefore, you probably can't use saveToFile directly.
2. There is a previous example using TStringList for outputing ADO data to text
file. Based on that, I have a sample as below (Note: the table has 2 field
Name,Capital, and the output text file is delimited with character:???):
procedure TForm4.Button1Click(Sender: TObject);
var
TSL: TStringList;
s,name,capital:string;
begin
adoTable1.Active:=true;
adoTable1.Open;
TSL:=TStringList.Create;
while not adoTable1.Eof do
Begin
name:=adoTable1.FieldbyName('name').AsString;
capital:=adoTable1.FieldbyName('capital').AsString;
s:=name+'???'+capital;
TSL.Add(s);
adoTable1.Next;
End;
TSL.SaveToFile('test.txt');
TSL.Free;
end;