Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What's with the Pack command?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00269678
Message ID:
00269745
Vues:
18
>This notion of , a record is not really deleted until a “Pack” is strange to me and is causing me to reconsider some basic design philosophies. If the user deletes a record from a table that has a primary key, is there a way for that user to re-enter that record before a pack procedure? If not then how to VFP programmers get around this?

Alan,

To add what everyone else has said, if the developers were to change this behavior it would break inummerable numbers of applications. (the delete then pack behavior)

If you think about it this behavior was a kind of 'buffer' of sorts. I've had several times over the years where a 'deleted' record was able to be recovered after being inadvertabtly deleted.

Jim's remarks that this design goes back to the origins of dBase are quite correct. When the dBase II language was release on CP/M it had onlt 2 work areas. < g >

Along with the others I'd suggest you just "roll your own" PK and don't bother trying to reuse the old PK. You can reuse the deleted record easily by developing a routine that, before adding a new record, looks for a deleted record (marked in some fashion that you find acceptible) and then just writes the new information into the old 'spot'. That way you don't have to worry about PACK.

Best,
Best,


DD

A man is no fool who gives up that which he cannot keep for that which he cannot lose.
Everything I don't understand must be easy!
The difficulty of any task is measured by the capacity of the agent performing the work.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform