Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Opening database
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00329695
Message ID:
00329961
Views:
26
>All solutions given is fine if your are sitting in your clients office. What happens when you sell off the shelf Apps written in VFP and clients all over the country are running your app. Is there any ready made utility which can fix this problem. A product which I spent $500 on cannot fix this problem even though they say it can fix it. Has anybody written any utility ?
>
>TIA
>Fred

Disclaimer: I am Using VFP 6 SP3.

The command validate database works under runtime. So, if you can open the database exclusively [after erasing the DCX], you can use that command to rebuild the DCX. The command, validate database recover, is not supported under runtime.

If all else fails -- Since the DBC is a table, you can treat it as such and manually rebuild the index [DCX]. I tried the following ON BACKUP COPIES OF THE 3 DB FILES:

close all
use npdes.dbc excl
ctag1=tag(1)
ckey1=key(1)
ctag2=tag(2)
ckey2=key(2)
delete tag all
index on &ckey1 tag (ctag1) for NOT Deleted()
index on &ckey2 tag (ctag2) for NOT Deleted()
use
rename npdes.cdx to npdes.dcx
open data npdes
return


This actually worked. So now, I can store the values of cTag1, cTag2, cKey1 and cKey2 in a table and create a procedure to erase the DCX, open the DBC as a table and rebuild the DCX based on the Tag and Key values. Note that I had to add the for NOT deleted() filter to the index commands.
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform