.......Reindexando índices........

Delphi

06/06/2003

Eu tenho um pequeno programa que usa 3 Table Paradox ......Como faço quando o programa for inicializado e Reindexando índices...[ ]s ...jairo


Jairo-go

Jairo-go

Curtidas 0

Respostas

Thaisandrade

Thaisandrade

06/06/2003

Caro Jairo, vê se isso resolve o seu problema.

function Reindexar(Tabela: TTable): integer;
begin
Tabela.Close;
Tabela.Exclusive:= True;
Tabela.Open;
case DbiRegenIndexes(Tabela.Handle) of
DBIERR_NONE: Result:= 0; //Ok
DBIERR_INVALIDHNDL: Result:= 1; //Tabela inválida
DBIERR_NEEDEXCLACCESS: Result:= 2; //Tabela em modo compartilhado
DBIERR_NOTSUPPORTED: Result:= 3; //Indices não suportados
else
Result:= 4; //Indices não criados
end;
Tabela.Close;
end;


GOSTEI 0
POSTAR