没有调试过,看看能不能实现。
procedure TForm1.Button1Click(Sender: TObject);
var
i,iCount: integer;
begin
//if not FileExists(文件) then
//exit;
//memo1.Lines.LoadFromFile(文件);
memo1.Text := '张红,1978-7-01,女,32,2500.00,湖南省'+#13#10+
'小芬,1972-4-01,女,21,2500.00,湖南省';
memo1.Lines.CommaText := memo1.Text;
iCount := memo1.Lines.Count div 6;
for i := 0 to iCount - 1 do
begin
ADOTable.Insert;
ADOTable.FieldByName('field1').AsString := memo1.Lines.Strings[i*6];
ADOTable.FieldByName('field2').AsString := memo1.Lines.Strings[i*6+1];
ADOTable.FieldByName('field3').AsString := memo1.Lines.Strings[i*6+2];
ADOTable.FieldByName('field4').AsString := memo1.Lines.Strings[i*6+3];
ADOTable.FieldByName('field5').AsString := memo1.Lines.Strings[i*6+4];
ADOTable.FieldByName('field6').AsString := memo1.Lines.Strings[i*6+5];
ADOTable.UpdateBatch();
end;
end;