Hi all,
I'm back again... for some best practice advice on record locking. [[5]] Now that I've got to the bottom of my set-up issues and can now run my app over a network - yes, you've guessed it - I'd like to ask about how you guys
handle record locking?
I'd like to use the standard
WD record locking mechanism, but I think my customer will fall off his chair if/when he sees the standard
WD locking message! He/they (won't mind me saying), are by no means technical!

My maintenance options (to keep key/button presses to a minimum), issue a HReadSeek as soon as a row is selected in a table and promote the READ record to input (edit) fields ready for work. This means that if a table has rows in it (ie; there are rows on the DB), then that first row is considered locked for WRITE (hLockWrite?) and if a a different row is then selected by the user, then this would be READ and considered as locked for WRITE (unlocking the other record of course).
I've set my customers expectations; don't leave maintenance screens "just sitting there" with records selected etc...etc... as this may cause locks. We're all happy with this, so I can continue...

Now, to test the locking, without adding any specific locking code, I started the same maint app on both networked PC's and amended the same record - I was allowed to amend the record that I'd already selected on the other PC - fair enough I thought - that just means by default it seems that "last modification wins"??? Is that true?
Then I added a hLockWrite to my HReadSeek in the Table (row selected) code. Ran the same maint app on both PC's again and selected a row from the Table - no problem there. Then selected a different row on the 2nd PC and got the standard
WD message saying record was locked, even tho it wasn't selected on the other PC :confused:
a) I'm a little confused (as usual!

), about the rules
WD uses for locking.
b) Wondering what you guys do for record locking?
1) use the standard locking?
2) use the standard locking with some tweaks?
or 3) Completely re-write the locking mechanism to your liking?
Sorry about this being "long winded" again, but any discussions will be much appreciated...