Adoquery怎么赋值给Clientdataset-CSDN论坛
展开全部
procedure TForm1.Button1Click(Sender: TObject);
var
k:integer;
begin
//前提条件是ClientDataSet1、ClientDataSet2所打开的表的结构必须相同哦
while not ClientDataSet1.Eof do
begin
ClientDataSet2.Append;
for k:=0 to ClientDataSet1.FieldCount -1 do
ClientDataSet2.Fields[k].Value:=ClientDataSet1.Fields[k].Value;
ClientDataSet2.Post;
ClientDataSet1.Next;
end;
end;
var
k:integer;
begin
//前提条件是ClientDataSet1、ClientDataSet2所打开的表的结构必须相同哦
while not ClientDataSet1.Eof do
begin
ClientDataSet2.Append;
for k:=0 to ClientDataSet1.FieldCount -1 do
ClientDataSet2.Fields[k].Value:=ClientDataSet1.Fields[k].Value;
ClientDataSet2.Post;
ClientDataSet1.Next;
end;
end;
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询