Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
SqlDataSource Class
 ConflictDetection Property

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
SqlDataSource..::.ConflictDetection Property

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

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)
Visual Basic (Declaration)
Public Property ConflictDetection As ConflictOptions
Visual Basic (Usage)
Dim instance As SqlDataSource
Dim value As ConflictOptions

value = instance.ConflictDetection

instance.ConflictDetection = value
C#
public ConflictOptions ConflictDetection { get; set; }
Visual C++
public:
property ConflictOptions ConflictDetection {
    ConflictOptions get ();
    void set (ConflictOptions value);
}
JScript
public function get ConflictDetection () : ConflictOptions
public function set ConflictDetection (value : ConflictOptions)
ASP.NET
<asp:SqlDataSource ConflictDetection="ConflictOptions" />

Property Value

Type: System.Web.UI..::.ConflictOptions
One of the ConflictOptions values. The default is the ConflictOptions..::.OverwriteChanges value.

The 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 SelectCommand property returns a DataTable object with the columns Name and Number and the ConflictDetection property is set to the OverwriteChanges value, parameters are created for Name and Number for the Update method. If the ConflictDetection property is set to the 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 OldValuesParameterFormatString property.) The SqlDataSource control then determines if the Update method that is specified in the UpdateCommand property has parameters that match.

Concurrency control is a technique that 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 ConflictDetection property to the CompareAllValues value, your Update method can then compare the old and new values to the original data source to detect conflicts and handle them, as necessary.

The ConflictDetection property delegates to the ConflictDetection property of the SqlDataSourceView object that is associated with the SqlDataSource control.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker