Y
yihui
Unregistered / Unconfirmed
GUEST, unregistred user!
一个Paradox表中有约20,000条数据,由于需要,要把其中所有记录
的某些字段转换到Access2000中,代码如下
begin
....
tblSource.First; //tblSource为Paradox
tblTarget.close; //tblTarget为Access
tblTarget.TableName:='Frame';
tblTarget.EmptyTable;
tblTarget.Open;
while not tblSource.Eof do
begin
Jn:=tblSource.fieldbyname('JmNo').Asinteger;
..........
Me:=tblSource.fieldbyname('Memo').Asstring;
tblTarget.AppendRecord([Jn,Fr,Pt,Us,Cn,Me]);
tblSource.Next;
end;
tblTarget.Close;
...
end;
程序执行时更新到3000条左右时就逐渐变慢,最后死掉...
后将TblTarget.CacheUpdate模式改为True,并调用ApplyUpdates
执行结果一样是在25%左右时停止响应.
我用另一个有3000条数据的paradox试验,发现执行结果很好.
请各位高手指点.thanks!
的某些字段转换到Access2000中,代码如下
begin
....
tblSource.First; //tblSource为Paradox
tblTarget.close; //tblTarget为Access
tblTarget.TableName:='Frame';
tblTarget.EmptyTable;
tblTarget.Open;
while not tblSource.Eof do
begin
Jn:=tblSource.fieldbyname('JmNo').Asinteger;
..........
Me:=tblSource.fieldbyname('Memo').Asstring;
tblTarget.AppendRecord([Jn,Fr,Pt,Us,Cn,Me]);
tblSource.Next;
end;
tblTarget.Close;
...
end;
程序执行时更新到3000条左右时就逐渐变慢,最后死掉...
后将TblTarget.CacheUpdate模式改为True,并调用ApplyUpdates
执行结果一样是在25%左右时停止响应.
我用另一个有3000条数据的paradox试验,发现执行结果很好.
请各位高手指点.thanks!