Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Occasionally hanging on a table with buffering
Message
From
19/01/2008 09:56:48
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
18/01/2008 19:52:05
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01283131
Message ID:
01283224
Views:
20
>Hilmar --
>
>It appears like I'm closer ...
>
>If I try two sessions, both can update records. However, if they both try to edit the same record, the second user who tries to do so just hangs until the first user releases the record.
>
>I'm only using CURSORSETPROP once on my table, with a value of five.
>
>Any further suggestions?

James,
As Hilmar explained just turn on buffering once at start (and at the very beginning, ie: directly in DE or load method). If you don't do that early enough you might cause the situation you describe (like Fox2x behavior-God I had to check it and act accordingly in those days).
With buffering set to 5, you may choose to save/revert all or single record changes using the parameters.
If you would do it single record wise buffering 3 is an option but hard to control unintentional implicit tableupdates.

PS: Don't forget, if you don't control it with functions like oldval(),curval() and have force parameter set to .T. in tableupdate, if two edits the same record then it's a "last write wins" implementation.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform