我有一个TTable,我正在加载CSV文件到这个TTable.有三个领域:Id,Hits&Path.我用另一个查询为这个TTable做了一些查找字段.
我想排序表.我收到消息"功能不受支持".当我试着打电话的时候AddIndex('ndxHits','HITS',[]);
这是我的代码:
with DM.TblCVResults do
begin
try
Active := False;
TableName := 'C:\CSV\123.txt';
Active := True;
AddIndex('ndxHits','HITS',[]);
AddIndex('ndxCandidate','LkCandidate',[]);
AddIndex('ndxLastCV','LkLastCV',[]);
AddIndex('ndxPostCode','LkPostCode',[]);
IndexDefs.Update;
Active := True;
DM.TblCVResults.IndexName := 'ndxHits';
except
on E: Exception do
MsgError(E.Message);
end;
end
Run Code Online (Sandbox Code Playgroud)