Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot PACK the table
Message
From
31/10/2006 10:07:51
 
 
To
31/10/2006 09:55:38
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01165720
Message ID:
01165772
Views:
15
>>>Dear John,
>>>
>>> I still cannot manage to PACK that table. I already removed all the triggers and indexes. But the message is still showing at the same record number. Any other possibilities, please?
>>>
>>>With Thanks,
>>>Mya
>>
>>Use yourtable excl
>>copy to temp
>>zap
>>append from temp
>
>Which works for free tables - I think it wouldn't keep the long field names, if any.
>
>Short of adding a temp table to the current database (or to a temp database - which is even more work), this may work as well and also keep the long field names:
>
>
use yourtable excl
>select * from yourtable into cursor temp nofilter
>select yourtable
>zap
>append from (dbf("temp"))
>
>I don't really remember whether there's anything in VFP6 that would prevent this from working. Just in case, before zapping the table, have a backup and check what's in the temp cursor, specially on the suspected record.
>
>Of course, if there are no fieldnames longer than 10 characters, this doesn't matter.

The reason why I chose a "real" table, and not a cursor, was that a "real" table will not disappear if you have a crash during the process. And I believe that you can use my procedure also for tables with long field names, because all tables with a long field name does not really contain long field names. The long field names are stored in the DBC and AFAIK you can address a long field name by the long field name, or a short field name, just like you can with long and short file names. And, BTW, I never use long field names...!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform