Link to home
Start Free TrialLog in
Avatar of kotik
kotik

asked on

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?
Avatar of Epsylon
Epsylon

Try the Fields Editor by right clicking on the Query component. Add all fields.

Epsylon.
Avatar of kretzschmar
hi kotik,

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

if yes then check in the bde-admin
configuration|drivers|native|dbase
the property level
set it to 25

and try again

meikl
Avatar of kotik

ASKER

Epsylon,
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.




hi kotik, had you read my comment?
Avatar of kotik

ASKER

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    :  

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

  Answer:
  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

meikl
Avatar of kotik

ASKER

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



Avatar of kotik

ASKER

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.

meikl
Avatar of kotik

ASKER

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...
ASKER CERTIFIED SOLUTION
Avatar of kretzschmar
kretzschmar
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial