
Multi-user db access PLEASE HELP !
PLEASE HELLLLLPPPPPP !!!
I would like to lock *** when calling EDIT, so that no-one
else can BEGIN editing. However, pessimistic locking (according to help
and my experiences) issues an immediate EXCLUSIVE (ie read-write) lock,
even if I'm just pointing at the record with the RDC, not actually
editing it. Seems a bit inadequate.
1. Optimistic = lock at UPDATE and bomb if fetched values <> current db
values
2. Pessimistic = lock immediately, don't even let someone READ the
record to look at it
3. Opto-Pessi (what I'd like) = Lock at EDIT, providing an error if the
record is already being EDITED (hence is locked) by someone else.
This is common garden variety database functionality, and the first
option I would have programmed if I was writing the code for the
ODBC/SQL server software, having done DB programming for a few years now
and knowing what I wish to do (and, I would assume, most other db a/p's
as well).
Upon closer inspection, it would appear that the first 2 options are a
sinch to program successfully, and the third, most useful and desirable
option not so easy.
Suggestions, anyone.
PLEASE HELLLLLPPPPPP !!!
Does anyone have knowlegde of controls or ANYTHING that allows my
opto-pessi record locking ?
Work now wants me to have the entire recordset in memory (using
RDO/ODBC), with Pessimistic locking, pointing the RDC at the record
(hence locking it) only when the user presses edit, updating a field
"LockedBy" in the record (contains the name of the user currently
editing the record) (to be checked before allowing an edit). Ugh !
Please tell me that multi-user read/write access to a database using VB
4.0 is possible without going to these lengths...
In anticipation,
Aaron
--
________________________________________________________________________
Analyst/Programmer _-\<, http://www.*-*-*.com/
Deakin Australia (+)/(+) Ph: (03) 5227 3190
------------------------------------------------------------------------