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