System.Web.UI.WebControls.SqlDataSourceView.ConflictDetection Property

Gets or sets the value indicating how the System.Web.UI.WebControls.SqlDataSource control performs updates and deletes when data in a row in the underlying database changes during the time of the operation.

Syntax

public System.Web.UI.ConflictOptions ConflictDetection { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

The SqlDataSourceView.ConflictDetection property determines whether parameters for old and new values are applied to the Update method. For example, if the command that is specified by the SqlDataSourceView.SelectCommand property returns a System.Data.DataSet object with the columns Name and Number, and the SqlDataSourceView.ConflictDetection property is set to the System.Web.UI.ConflictOptions.OverwriteChanges value, parameters are created for Name and Number for the update operation. If the SqlDataSourceView.ConflictDetection property is set to the System.Web.UI.ConflictOptions.CompareAllValues value, parameters are created for Name, Number, original_Name, and original_Number. (The exact name of the parameters for the original values depends on the SqlDataSourceView.OldValuesParameterFormatString.) Then, the System.Web.UI.WebControls.SqlDataSourceView object determines if the method that is specified in the SqlDataSourceView.UpdateCommand property has parameters that match.

Concurrency control is a technique data stores use to control how data is read and changed in the store when multiple clients are accessing and manipulating the same data. For example, one client reads data and presents it to a user, while another client reads the same data, and presents it to a different user. If both users update the data and submit it to the data storage, some unexpected result might occur, because both clients might update different values for the same data. This is considered a conflict. By setting the SqlDataSourceView.ConflictDetection property to the System.Web.UI.ConflictOptions.CompareAllValues value, the update operation can then compare the old and new values to the original data source to detect conflicts and handle them as required.

The value of the SqlDataSourceView.ConflictDetection property is stored in view state.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0