Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need advise restoring vfp 8.0 dbf to database
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00887627
Message ID:
00887633
Views:
7
This message has been marked as a message which has helped to the initial question of the thread.
You could try this....

lcTableName = GETFILE('DBF','Select Table To Fix')
lcTableValidate = 'set tablevalidate to 0'
&lcTableValidate

use &lcTableName exclusive

alter table &lcTableName add column vvvxxxvv c(1)

alter table &lcTableName drop column vvvxxxvv
use

lcTableValidate = 'set tablevalidate to 3'
&lcTableValidate

lnYesNo = MESSAGEBOX('Finished: ' + ALLTRIM(lcTableName)


>guys,
>
>i have a database containing about a bunch of dbfs. the dbfs have field names greater than 10 characters, default values, triggers and joins. here is the problem i have:
>
>once in a while a table gets corrupted. so what i end up doing is
>
>1. set tablevalidate to 0
>2. copy the table to a backup
>3. remove the corrupt table from the database
>4. rename and then add the backup table
>5. rename all the fields and add the default values, triggers, etc.
>
>as you can see step 5 is a pain in the neck. is there a way i can do this more efficiently?
>
>thanks,
>
>nancy
ICQ 10556 (ya), 254117
Previous
Reply
Map
View

Click here to load this message in the networking platform