取消与设置CDS本地排序
取消CDS本地排序.
cds.IndexDefs.Update;
if cds.IndexName<>'' then
begin
if cds.IndexDefs.IndexOf('index1')>=0 then cds.DeleteIndex('index1');
cds.IndexDefs.Clear;
cds.IndexName:='';
end;
设置CDS本地排序
cds.IndexDefs.Update;
cds..AddIndex('index1','sum_num',[ixDescending]);
cds.IndexName:='index2';
cds.First;