如题:
ClientDataSet中的数据不是来自数据库,希望把它清空,然后重新insert。
我这样写的:
if CDS.RecordCount<>0 then
begin
CDS.First;
while not CDS.Eof do
begin
for n:=0 to CDS.FieldCount-1 do
CDS.Fields[n].Value := '';
CDS.Next;
end;
end;
我在前面加open或close都不对,到底该怎样写?
ClientDataSet中的数据不是来自数据库,希望把它清空,然后重新insert。
我这样写的:
if CDS.RecordCount<>0 then
begin
CDS.First;
while not CDS.Eof do
begin
for n:=0 to CDS.FieldCount-1 do
CDS.Fields[n].Value := '';
CDS.Next;
end;
end;
我在前面加open或close都不对,到底该怎样写?
***********************************
高级群号:16497064欢迎编程高手加入.
***********************************
但, 总不能全设成 Null 吧, 用作 Key 的字段怎办?