Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I pack a file/reindex within a form
Message
From
07/08/2006 10:32:21
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
07/08/2006 07:42:48
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01143376
Message ID:
01143459
Views:
11
>Thanks, Tore,
>
>I thought I was missing something, and did not know it's never done!

Doing a PACK every time you delete a record is wrong, for the following reasons:
  • You need exclusive access to the table. This won't work in a multi-user environment.
  • PACK is very slow for large tables.

    Most of the time, you should simply hide deleted records, with the command SET DELETED ON. If you use private datasessions, you must do this in every form (this is easier if you use inheritance).

    You should still do a PACK once a week, once a month, or once a year, to increase performance (too many deleted records will make your application slower).
    Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
  • Previous
    Next
    Reply
    Map
    View

    Click here to load this message in the networking platform