2,498
社区成员
发帖
与我相关
我的任务
分享
procedure TForm1.Button1Click(Sender: TObject);
var i,j,k,i1.j1,k1,L:integer;
S,ID::string;
begin
i1:=StrToInt(Edit1.text);
j1:=StrToInt(Edit2.text);
k1:=StrToInt(Edit3.text);
DateTimetoString(ID,'yymmddhhnnss',now);
L:=0;
for i:=1 to i1 do
for j:=1 to j1 do
for k:=1 to k1 do
begin
L:=L+1;
S:=IntToStr(i)+'-'+IntToStr(j)+'-'+IntToStr(k);
with DBGrid1.DataSource.DataSet do
begin
Append;
FieldByName('字段1').asString:= S;
FieldByName('ID').asString:= ID+IntToStr(L); // 主键
Post.
end;
end;
end;