Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Opening FoxPro indexed DBF files

Posted on 1999-06-22
11
Medium Priority
?
592 Views
Last Modified: 2011-04-14
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?
0
Comment
Question by:kotik
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
11 Comments
 
LVL 13

Expert Comment

by:Epsylon
ID: 1384044
Try the Fields Editor by right clicking on the Query component. Add all fields.

Epsylon.
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 1384045
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
0
 
LVL 2

Author Comment

by:kotik
ID: 1384046
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.




0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 27

Expert Comment

by:kretzschmar
ID: 1384047
hi kotik, had you read my comment?
0
 
LVL 2

Author Comment

by:kotik
ID: 1384048
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.




0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 1384049
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
0
 
LVL 2

Author Comment

by:kotik
ID: 1384050
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



0
 
LVL 2

Author Comment

by:kotik
ID: 1384051
Is there a way to turn off indexes while opening datafiles using BDE?
I need that indexes in other applications.



0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 1384052
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
0
 
LVL 2

Author Comment

by:kotik
ID: 1384053
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...
0
 
LVL 27

Accepted Solution

by:
kretzschmar earned 400 total points
ID: 1384054
hi kotik,

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

meikl ;-)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question