Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
No Zap...No Pack ??
Message
From
28/11/2001 06:40:58
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00586764
Message ID:
00586849
Views:
16
>>Is there a way to recycle deleted records?
>>
>>If so then that might preclude the need to zap or pack (or other workarounds)
>>
>>TIA
>>Jere Dorough
>
>You can, but you have to do it yourself.
>Something along the lines of
>
>
>cDel= SET('DELETED')
>SET DELETED OFF
>LOCATE FOR DELETED()
>IF FOUND()
>    * Recycle this record
>    BLANK()
>    RECALL()
>ELSE
>    * No deleted, so create new
>    APPEND BLANK
>ENDIF
>SET DELETED (m.cDel)
>
>
>
>I havnt tested the above code, but I know it is something like that, might need to add some more security etc.

Small correction: BLANK is a command, not a function.

I did something similar once. With an OOP-framework (designed by yourself, or bought), you would want to integrate this into the generic commands that add a record.

Please note that this method will not completely avoid the need to PACK if you have memo fields!

What I currently do is simply program the PACK for some time around midnight.

Hilmar.
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
Reply
Map
View

Click here to load this message in the networking platform