On Dec 30, 2006, at 10:55 AM, Carl Karsten wrote:
> "If a user is about to update the database and someone has changed
> the backend data. What happens?"
>
> I think the answer should be: "It depends on which WhereType you
> are using:
> either the first update gets overridden, or your update doesn't
> update."
The answer is not that simple. It depends on the backend you are
using, the locking schemes being used, etc. It also depends on your
code; you can make it behave however you want.
> I am guessing dabo does "WHERE pkFIled = pkValue" and so currently
> the answer is
> "the first update gets overridden." - right?
Probably. Unless your database somehow tracks changes by connection,
and refuses updates to stale data based on that. Or unless someone
else has locked that record and the database blocks the update.
I discovered that using anything but WhereType=1 in VFP to be god-
awful slow. In fact, I wrote my own conflict checker and added it to
Codebook (dunno if it ever made it into VFE). Since I had some
logging code in their to check the coverage, speed, etc. of the code,
I left it in when I first deployed it on a client site. There were
nearly 300 people simultaneously using the app, and I logged every
time that one user tried to update a 'dirty' record. In the six
months I had that running, there was not a single case where this
happened. Why? Because we designed the app to be smart. Each person
was working on one particular record, which was marked by a
semaphore. Once marked, no one else could edit it. This was highly
desirable, since each record represented a different contract, and
there shouldn't be two reps working on the same deal at the same time.
This is why I think that handling this sort of issue belongs in your
code, not Dabo's.
-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev