SDAC

TMSDataSetOptions.StrictUpdate Property

Used for TCustomDADataSet to raise an exception when the number of updated or deleted records is not equal 1.

Class

TMSDataSetOptions

Syntax

property StrictUpdate: boolean;

Remarks

TCustomDADataSet raises an exception when the number of updated or deleted records is not equal 1. Setting this option also causes an exception if the RefreshRecord procedure returns more than one record. Does not affect TCustomMSDataSet.CursorType if CursorUpdate is True. The default value is True. In order for this option to work correctly, the SQL Server NOCOUNT option should be OFF (this is the default value). If NOCOUNT is ON, SQL Server returns 0 instead of the actual affected rows count. SDAC does not care for this option itself in order to avoid additional round trips to server.

We do not recommend using the StrictUpdate option with tables on which a trigger is defined, because this will cause problems if there are commands that modify data in the trigger. But if you need to use this combination, you should call the SET NOCOUNT ON command at the very beginning of the trigger to suppress sending affected rows count for SQL statements executed within the trigger.

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