Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pack
Message
From
09/04/2003 04:40:26
 
 
To
09/04/2003 04:21:44
Issam Mansour
Jordan Business Machines
Amman, Jordan
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Re: Pack
Miscellaneous
Thread ID:
00775371
Message ID:
00775378
Views:
13
Issam, there is no way to PACK a file unless its open exclusive. The other option is to open the file in shared mode and copy its non-deleted records to another table. Then close and delete the original table and rename the new table back to the original table's name. Effectively this is what a PACK does anyway.
* Open my table in shared mode
USE MyTable SHARED

* Create a copy without deleted records and with any indexes
COPY TO MyTable2 FOR !DELETED() WITH PRODUCTION

* Close the original table
USE

* Delete the original table and any associated CDX/FPT etc files
DELETE FILE MyTable.*

* Rename the copied table to the original name
RENAME MyTable2.* TO MyTable.*
>Hi,
>
>Is there any way to do pack without open the file with exclcive or remove the deleted records from the file without pack
>
>Best Regards
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Previous
Reply
Map
View

Click here to load this message in the networking platform