• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 610
  • Last Modified:

Opening FoxPro indexed DBF files

How do I open an indexed FoxPro DBF file using TQuery.
There are expressions in the index tag.
I get an error while opening the file: 'Invalid index description'. Can I turn off indexes from Delphi?
  • 5
  • 5
1 Solution
Try the Fields Editor by right clicking on the Query component. Add all fields.

hi kotik,

your dbf-file is valid? can you open it with other apps than delphi?

if yes then check in the bde-admin
the property level
set it to 25

and try again

kotikAuthor Commented:
I can't open that table even in Database Explorer.
If I delete .CDX file, everything is OK, but I need that indexes in a non Delphi application.
Is there a way to open the table without using indexes.
The fields editor gives the same error message.

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

hi kotik, had you read my comment?
kotikAuthor Commented:
Hi, Meikl

Yes, all files are valid. I can open them in FoxPro and other non Delphi apps.
The Level in driver settings is 25.
There are expressions in the index file and BDE cannot open them.

hi kotik,

that have i found in the q&a from inprise

--------------begin paste
Question and Answer Database

  FAQ321B.txt   Unsupported Expression Indexes
  Category   :Database (FoxPro)
  Platform    :Win95/NT
  Product    :  

  What types of FoxPro indexes are not supported by the BDE?  
  When trying to open some tables, I get an "Invalid Index
  Descriptor" error.

  This error occurs when the production index (.CDX) associated
  the table has an index tag which has an expression which the BDE
  cannot evaluate. The solution is to delete the tag using FoxPro
  create an eqivalent index that the BDE can understand.

  The following conditions are not supported by the BDE and will
  cause "Invalid Index Descriptor" error.

  DTOC(<expd>, 1) format not supported; Use DTOC(<expd>).
  ALLTRIM function not supported; Use LTRIM(RTRIM(Field)).

  5/15/98 1:37:20 PM
------------ end paste
it seems there is no way to solve this, except as described above, if possible.

sorry for no better result

kotikAuthor Commented:
Thank you, meikl! It helped me to localize the problem.
There is a function in the index tag which is not supported too: PADR()
Have you an idea where can I find all not supported functions and their equivalents (if available).
(Send them as answer)

Regards, Kotik

kotikAuthor Commented:
Is there a way to turn off indexes while opening datafiles using BDE?
I need that indexes in other applications.

hi kotik,

nope, no way, to disable the indexfiles.
i've looked arround for a list of not supported functions, but didn't find one.

i'm not familar with foxpro-functions, but maybe there is a combination of functions, which have the same result as padr() and are supported by the bde.

kotikAuthor Commented:
Thank you, meikl.
I'll try to find a workaround. Maybe LPAD(RPAD()) can help to get rid of PADR()
You can get 100*A points if you submit something as an answer...
hi kotik,

well, thanks for the points.
i wish you good luck for the workaround.

meikl ;-)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 5
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now