这段代码不知道对你有没有用:
var TextList:Tstringlist;
LineStr:string;
LineNo:integer;
begin
Textlist:=Tstringlist.create;
if opendialog1.Execute then
begin
Textlist.LoadFromFile(opendialog1.filename);
LineNo:=1;
while LineNo<TextList.Count do
begin
LineStr:=Textlist[LineNo];
adotable1.InsertRecord([copy(linestr,1,6),copy(linestr,7,7),copy(linestr,11,11)]);
Inc(LineNo);
end;
end;
TextList.Free;
end;