Board index » delphi » Create a DBase index File

Create a DBase index File

Hi guys,

I need to create an index file (mdx) of a DBase File.
I have NO index for this file created, and Delphi doesn't allow the table to
be opened.
I've tried Table.AddIndex, DbiAddIndex and the file wasn't created.
How could I create it?

Tks,

Bruno

---
" Trs classes de pessoas s?o infelizes:
as que n?o sabem e n?o perguntam,
as que sabem e n?o ensinam,
as que ensinam e n?o fazem."
           V.Beda.

Delphi Developer

Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.507 / Virus Database: 304 - Release Date: 04/08/03

 

Re:Create a DBase index File


Use a Query with

Create Index idx_indexname on tablename(table_field)

Heiko

Re:Create a DBase index File


Quote
"^Buddy^" <bruno-pe...@bol.com.br> wrote:
>I have NO index for this file created, and Delphi doesn't allow the table to
>be opened.

dBASE tables have one of the bytes in the file header that tells
whether an index file exists.  It looks like either the main table
has been delivered to you without the related index, or somehow
the table header has been corrupted.

If you search through groups.google.com or another good archive,
you should be able to find instructions for altering the header
in a hex editor so that you can open the table without the index.

Rick Carter
Rick.Car...@cincww.rcc.org
Chair, Paradox/Delphi SIG, Cincinnati PC Users Group

Re:Create a DBase index File


tks a lot, but a need to do it using Delphi....

---
" Trs classes de pessoas s?o infelizes:
as que n?o sabem e n?o perguntam,
as que sabem e n?o ensinam,
as que ensinam e n?o fazem."
           V.Beda.

Delphi Developer

Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.509 / Virus Database: 306 - Release Date: 12/08/03

Other Threads