SDAC

MSAccess.__UseUpdateOptimization Variable

In SDAC 4.00.0.4 update statements execution was optimized. This optimization changed the behaviour of affected rows count retrieval for the tables with triggers.

Unit

MSAccess

Syntax

__UseUpdateOptimization: boolean;

Remarks

In SDAC 4.00.0.4 update statements execution was optimized. This optimization changed the behaviour of affected rows count retrieval for the tables with triggers. If a trigger performs modifications of other records reacting on a modification in the underlying table, SQL Server sends several values of affected rows count (including for modifications made by a trigger). Prior to SDAC 4.00.0.4 the first value was considered as affected rows count, when in SDAC 4.00.0.4 and higher it's the last value. However neither of these two approaches can be considered correct, as there can be triggers that snap into action both before modification and after modification. There is no way to determine which of the values returned by SQL Server is the correct value of affected rows count. Therefore we do not recommend using the RowsAffected property when updating tables with triggers.

The StrictUpdate mode is based on RowsAffected, therefore we also do not recommend using StrictUpdate when updating tables with triggers.

If you want to disable this optimization, set the __UseUpdateOptimization variable to False.

© 1997-2019 Devart. All Rights Reserved. Request Support DAC Forum Provide Feedback