Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
If you use buffering, then VFP does all of the locking for you. You just choose the locking mode: optimistic or pessimistic. If you do not want to use buffering but you also do not want to manually lock the record, in order to unlock the record after its been automatically locked, you have to move the record pointer or issue unlock (or end transaction), even if you set MULTILOCKS ON. I think buffering is the safest method for multiuser environments. If I cannot use buffering for whatever reason, I manually lock and unlock the record myself and do not let VFP handle it outside of buffering.
I don't think there's any point in me using VFP's buffering since the records aren't updated until the user saves anyway. But if people using buffering let VFP do the locking for them, why is that any different than using the automatic locking that happens during a GATHER rather than explicitly locking the table during the GATHER? Why do you manually lock the record? It's going to get locked either way. What benefit is there in specifically calling RLOCK?
Thanks,
Michelle
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement