Board index » delphi » Creating an index file for a Paradox 5.0 db file in Delphi 1.0

Creating an index file for a Paradox 5.0 db file in Delphi 1.0

A user erased the AFAKODOK.XG0 file which belonged to the AFAKODOK.DB
file. How can I recreate this file from my exe program? I 've tried
the TIdxUtl unit's RegenIndex method, which unit is a part of the
TUtility unit, but I wasn't succeed. I've also tried the DBIRegenIndexes
method from another unit, but that also was not succesfull. Probably
they cannot create an indexfile phisically, only update an existing one.
Please send an E-mail if you can solve my problem!

        Thanks for your help: Tibor Tamas, PC Szoftver, Hungary

 

Re:Creating an index file for a Paradox 5.0 db file in Delphi 1.0


Why don't you use an sql statement in a TQuery such as
create index idx_personal_name on "personal.db" (name);

you can check if the index exists with
try
  table.indexname:= 'idx_personal_name';
except
end;

Tams Tibor <tam...@pc-szoftver.mgx.hu> schrieb im Beitrag
<347C090E.5...@pc-szoftver.mgx.hu>...

Quote
> A user erased the AFAKODOK.XG0 file which belonged to the AFAKODOK.DB
> file. How can I recreate this file from my exe program? I 've tried
> the TIdxUtl unit's RegenIndex method, which unit is a part of the
> TUtility unit, but I wasn't succeed. I've also tried the DBIRegenIndexes
> method from another unit, but that also was not succesfull. Probably
> they cannot create an indexfile phisically, only update an existing one.
> Please send an E-mail if you can solve my problem!

>    Thanks for your help: Tibor Tamas, PC Szoftver, Hungary

Other Threads