Board index » delphi » Problems with dBase index files

Problems with dBase index files

I've a dBase table in which I've an index to show the data in order.

All seems to work well but when I delete a record and then I want to
insert another record with the same key it seems not to work.

When I dont use the index the application works perfectly and then I
suspect that the problem is that the index file (MDX) is not actualized
properly.

Any ideas?

Thank you in advance

--

Jaime Villarino

(please send the answers to the email direction edua...@udc.es)

 

Re:Problems with dBase index files


I had a similar problem, I solved it by packing the dBase table after
deleting a record before I added another record that used the same index
that the deleted record used.

Use the DbiPackTable procedure to pack tables. Borlands web site has more
info on packing tables, see Delphi Technical Information Documents TI2873
for an example on how to pack dBase tables.

Hope that helps...

- Todd

Eduardo Mosqueira Rey <edua...@udc.es> wrote in article
<33B947DF....@udc.es>...

Quote
> I've a dBase table in which I've an index to show the data in order.

> All seems to work well but when I delete a record and then I want to
> insert another record with the same key it seems not to work.

> When I dont use the index the application works perfectly and then I
> suspect that the problem is that the index file (MDX) is not actualized
> properly.

> Any ideas?

> Thank you in advance

> --

> Jaime Villarino

> (please send the answers to the email direction edua...@udc.es)

Other Threads