Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
When to use Transaction Processing and Table Buffering?
Message
From
05/09/2006 09:00:02
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01150834
Message ID:
01150903
Views:
29
>Thanks for a very informative answer.
>If Table Buffering is locking the table (like FLOCK()), during TABLEUPDATE, does this mean that I cannot issue a TABLUPDATE if a second person is also using the table in a shared mode?
>Or does TABLEUPDATE try to lock each record to be updated one at a time like RLOCK() while performing the update?

If you use optimistic table buffering (5) then other users can still access all records. Changes are written in buffers not in actual table.
Locking is happening on saving (by tableupdate()).

In case of colision (someone else already updated one of the records you tackled) VFP will flush error 1585 which you can trap and act accordingly.

You might not even need transaction to revert table to its previous state
since you are amending single table - tablerevert() might be just enough for what you need.

However, It pays back big time to hv saving process well organised, having tableupdates always wrapped together into transaction fold.

*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Previous
Reply
Map
View

Click here to load this message in the networking platform