Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Buffering vs Begin..End Transaction
Message
 
À
25/12/1999 10:57:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00305569
Message ID:
00308576
Vues:
29
>What if matter of change is replacing not adding new records? This way header should not be locked. In another scenario, IMO if buffering case includes adding new recors, then headers will be locked anyway. VFP suppose to lock headers (for short time) when it creates new record through buffer or with no buffer. As long as transaction is dynamic, locking will be handled by SET REPROCESS.

Ed,

Updating an existing record does not lock the dbf header at all, therefore the only thing locked is the exact record being updated and the multi-user conflict is limited to that record.

The issue with using a transaction with unbuffered tables has to do with how long the locks are held not whether they are held or not. First transactions are not needed when one table is being updated, buffering and the proper use of tableupdate will insure that situation is completed properly.

With a transaction the locks are held on all tables involved for the complete duration of the transaction. If the tables are buffered all of the calculations and field data changes have been accomplished (using direct replace statments if desired)outside of the transaction and the only thing that is in the transaction is the TaleUpdate calls making for a very short duration (since all activity is inside VFP and not interpreted lines of code doing replaces or gather statements). With unbuffered tables one either has to calculate a whole bunch of memvars to hold the data values before the transaction or else there are calculations going on inside the transaction which extends the duration of the transaction and thusly the locked record time.

Keep in mind that none of this is talking about while the form is running, it is only the duration of the actual transaction. Buffered tables are not locked when you append a blank record outside of a transaction. The TableUpdate will hold a short lock adn a trnasaction will hold a lock until the transaction is committed or rooled back.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform