W
wind_cloudy
Unregistered / Unconfirmed
GUEST, unregistred user!
好几处笔误,将第4步修改如下:
4.with query1 do
begin
first;
while not Eof do
begin
query2.insert;
query2.fieldbyname('name').asstring:=query1.fieldbyname('name').asstring;
query2.fieldbyname('date').asinteger:=query1.fieldbyname('date').asinteger;
query2.fieldbyname('date2').asinteger:=变量1;
query2.post;
Next;
end;
end;
with query2 do
begin
Database2.StartTransaction;
try
ApplyUpdates;
Database2.Commit;
except
Database2.Rollback;
end;
CommitUpdates;
end;
4.with query1 do
begin
first;
while not Eof do
begin
query2.insert;
query2.fieldbyname('name').asstring:=query1.fieldbyname('name').asstring;
query2.fieldbyname('date').asinteger:=query1.fieldbyname('date').asinteger;
query2.fieldbyname('date2').asinteger:=变量1;
query2.post;
Next;
end;
end;
with query2 do
begin
Database2.StartTransaction;
try
ApplyUpdates;
Database2.Commit;
except
Database2.Rollback;
end;
CommitUpdates;
end;