语言不如文字,文字不如图形;
没有图形等示意,咱们就代码,呵呵
procedure TForm1.Button1Click(Sender: TObject);
var
aStrings: TStrings;
iStart,iNext: integer;
begin
aStrings:= TStringList.Create;
iStart:= 1;
iNext:= 1;
try
aStrings.LoadFromFile('xxx.txt');
ADOQuery1.Append;
ADOQuery1.fieldbyname('A').asString:= copy(aStrings.Text,iStart,ADOQuery1.fieldbyname('A').DataSize);
iNext:= iNext+ ADOQuery1.fieldbyname('A').DataSize;
ADOQuery1.fieldbyname('B').asString:= copy(aStrings.Text,iNext,ADOQuery1.fieldbyname('B').DataSize);
{...}
ADOQuery1.Post;
finally
aStrings.Free;
end;
end;
不过我总感觉这种设计有点不习惯,呵呵,
当然喽,也不知道你有什么特殊需求拉,哈哈