Hello Walaa
Using this code:
// Initialize Class
tempEntity = LookupValues_ConvertFrom(LookupValues_GetValues(Id));
// Assign Value
tempEntity.Fields[(int)LookupValuesFieldIndex.Order].ExpressionToApply = (LookupValuesFields.Order - 1);
// Update Entities
adapter.UpdateEntitiesDirectly(tempEntity,
new RelationPredicateBucket((LookupValuesFields.LookupTypeId == tempEntity.LookupTypeId) &
(LookupValuesFields.Order > tempEntity.Order)));
I am getting the following SQL update which is updating all the field values.
How do I just update the Order field?
UPDATE
[tblLookupValues]
SET
[ifkLookupTypeID]=@LookupTypeId,[intOrder]=[tblLookupValues].[intOrder] - @LLBLEP1,
[Value]=@Value
WHERE
( ( ( [tblLookupValues].[ifkLookupTypeID] = @LookupTypeId2 AND [tblLookupValues].[intOrder] > @Order3)))
Regards,
Simon
Walaa wrote:
Should look like the following:
// C# Adapter example:
LookupValuesEntity lookUp = new LookupValuesEntity();
lookUp.Fields[(int)LookupValuesFieldIndex.intOrder].ExpressionToApply =
(LookupValuesFields.intOrder - 1);
DataAccessAdapter adapter = new DataAccessAdapter();
adapter.UpdateEntitiesDirectly(lookUp, new RelationPredicateBucket(LookupValuesFields.ipkLookupValuesID == "XYZ"));