J
Jinie
Unregistered / Unconfirmed
GUEST, unregistred user!
在服务器中的DATAPROVIDER传出两个DATA数据包到一个CLIENTDATASET,其中两个DATA数据包有重复
记录,如何合并重复数据包到该CLIENTDATASET?我的做法:
ClientDataSet.Data:=Data1;
ClientDataSet1.Data:=Data2;
ClientDataSet.Frist;
while ClientDataSet.Eofdo
begin
if FoundData then
//我的对应查找重复记录方法
begin
ClientDataSet.ReadOnly:=False;
ClientDataSet.Append;
//发生错误,CLIENTDATASET READONLY
for i:=0 to ClientDataSet1.Fields.Count-1do
begin
ClientDataSet.Fields.Value:=ClientDataSet1.Fields.Value
end;
end;
ClientDataSet.Next;
end;
以上程序发生CLIENTDATASET为READONLY,为什么呢?
记录,如何合并重复数据包到该CLIENTDATASET?我的做法:
ClientDataSet.Data:=Data1;
ClientDataSet1.Data:=Data2;
ClientDataSet.Frist;
while ClientDataSet.Eofdo
begin
if FoundData then
//我的对应查找重复记录方法
begin
ClientDataSet.ReadOnly:=False;
ClientDataSet.Append;
//发生错误,CLIENTDATASET READONLY
for i:=0 to ClientDataSet1.Fields.Count-1do
begin
ClientDataSet.Fields.Value:=ClientDataSet1.Fields.Value
end;
end;
ClientDataSet.Next;
end;
以上程序发生CLIENTDATASET为READONLY,为什么呢?