G
Guest
It could be me, but the check box for optimistic concurrency looks like it
should be called pessimistic concurrency and seems completely broken. To me
optimistic concurrency say's I'm never going to have a concurrency problem,
last save wins (which is the default). When you check the box, it say's I'm
only going to update the record if it hasn't changed on you. That being
said, it appears that checking the box will only work if you never allow a
null value in your tables?
It generates an update statement such as the following:
UPDATE [Test] SET [test] = @test WHERE [id] = @original_id AND [test] =
@original_test
The problem is if test or original_test are ever null, this statement will
never update data. If you have 40 fields, non of them can be null? Perhaps
what they mean by optimistic, is they're optimistic you'll never need a null
column?
Does anyone have a simple work around for this?
How do you tell if the update didn't work? (Seems it would be good to
indicate that?)
should be called pessimistic concurrency and seems completely broken. To me
optimistic concurrency say's I'm never going to have a concurrency problem,
last save wins (which is the default). When you check the box, it say's I'm
only going to update the record if it hasn't changed on you. That being
said, it appears that checking the box will only work if you never allow a
null value in your tables?
It generates an update statement such as the following:
UPDATE [Test] SET [test] = @test WHERE [id] = @original_id AND [test] =
@original_test
The problem is if test or original_test are ever null, this statement will
never update data. If you have 40 fields, non of them can be null? Perhaps
what they mean by optimistic, is they're optimistic you'll never need a null
column?
Does anyone have a simple work around for this?
How do you tell if the update didn't work? (Seems it would be good to
indicate that?)