KAF wrote:
But the values I compare against must be fetched from the database at some point, so how can I be certain that the row hasn't been updated after I fetched it?
No, they are not fetched, the compare is done in the UPDATE transaction.
Let's say you do a fetch of:
SELECT * FROM Customers
So, when you update your statement looks like this:
UPDATE Customers
SET FirstName = "New name"
WHERE [id] = 1 and [FirstName] = "Old Name"
If FirstName, the value you changed is still the same value it was when you retrieved the record "Old Name" then the update will be succesful. But, if FirstName now has a value of "Newer Name" then your Update will fail.
BTW: You have to code this predicate yourself, LLBLGen Pro doesn't do it out of the box. (I think). Although it would be nice if it had an option to.
BOb