Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem updating a DBC when adding Index to a table
Message
From
13/01/1999 17:32:02
Ernie Veniegas
Micro System Solutions, Inc.
Calistoga, California, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Problem updating a DBC when adding Index to a table
Miscellaneous
Thread ID:
00175708
Message ID:
00175708
Views:
80
Is there something wrong with adding an index to a table programattically and keeping the DBC in sync?

I have an app that runs "maintenance code" when the application launches. One of the things it does it test to see if one of the app's critical tables contains a certain needed index. If not, I open it exclusive, then issue something like ...

USE MyTable exclusive
INDEX ON student_id TAG student_id ADDITIVE

When I do this, I'm expecting that the DBC in which the table is contained will know that the table now has a new index.

If I exit the app and get at the DBC via native FoxPro (5.0), I can OPEN MyDataBase, MODIFY DATABASE and look at MyTable and see that the new index is there. I can even just USE MyTable and see the index I added programmatically.

But, if I run VALIDATE DATA, I get a message saying ...

"Object #83 (Table "MyTable"): One or more structural indexes missing from DBC."

When I run VALIDATE DATA RECOVER, I get a message saying ...

"The index tag STUDENT_ID in the structural CDX of table c:\...\MyTable.dbf was not found in the DBC. Would you like to add this index to the DBC, delete the object, or cancel the validation?" [Add] [Delete] [Cancel].

Am I missing something? Is there some other command I'm supposed to be issuing after I programmatically add the index so that the index gets added to the DBC?

Help.
Ernie Veniegas
Micro System Solutions
... sensible software by design
Next
Reply
Map
View

Click here to load this message in the networking platform