1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| try
form1.table1.Open;
except
// supression des fichier index (dans ce cas on un 1 index primaire et deux secondaire
deletefile(pchar(DBPath + '\table1.PX'));
deletefile(pchar(DBPath + '\table1.XG0'));
deletefile(pchar(DBPath + '\table1.YG0'));
deletefile(pchar(DBPath + '\table1.XG1'));
deletefile(pchar(DBPath + '\table1.YG1'));
// re creation des index
with form1.table1 do
begin
AddIndex('','inxpim',[ixPrimary]); //création d'ndex primaire
AddIndex('ind_sec1','champ1',[ixcaseinsensitive]);//création d'index secondaire nommé "ind_sec1" pour champ "champ1"
AddIndex('ind_sec2','date',[ixcaseinsensitive]);
end;
form1.table1.open
end; |
Partager