Hi, (Using Adapter 2.5/VB/WinForm/SQL Server 2005)
I'm using a TimeStamp field called 'RowVer' for concurrency checks, and set the ConcurrencyPredicateFactory to use before the SaveEntity:
sysParam.ConcurrencyPredicateFactoryToUse = New ConcurrencyPredicateFactory()
adapter.SaveEntity(sysParam, True)
ConcurrencyPredicateFactory:
Imports SD.LLBLGen.Pro.ORMSupportClasses
Public Class ConcurrencyPredicateFactory
Implements IConcurrencyPredicateFactory
Public Function CreatePredicate(ByVal typeToCreate As ConcurrencyPredicateType, _
ByVal containingEntity As Object) As IPredicateExpression _
Implements IConcurrencyPredicateFactory.CreatePredicate
Dim concurrencyPredicate As IPredicateExpression = New PredicateExpression()
Dim entity As EntityBase2 = DirectCast(containingEntity, EntityBase2)
If entity.Fields("RowVer") IsNot Nothing AndAlso typeToCreate = ConcurrencyPredicateType.Save Then
concurrencyPredicate.Add(New FieldCompareValuePredicate(entity.Fields("RowVer"), Nothing, ComparisonOperator.Equal))
End If
Return concurrencyPredicate
End Function
End Class
before saving the entity I update the row in Management Studio, but this is not detected by the ConcurrencyPredicateFactory. Can anyone see what I've missed?
Thanks