ApplyChangeFailedEventArgs Class
Collapse the table of content
Expand the table of content

ApplyChangeFailedEventArgs Class

Synchronization Services - ADO.NET 1.0 SP1

Provides data for the client ApplyChangeFailed event and the server ApplyChangeFailed event.

Namespace: Microsoft.Synchronization.Data
Assembly: Microsoft.Synchronization.Data (in

public ref class ApplyChangeFailedEventArgs : public EventArgs
public class ApplyChangeFailedEventArgs extends EventArgs
public class ApplyChangeFailedEventArgs extends EventArgs

If a row cannot be applied during synchronization, the ApplyChangeFailed event is raised. The ApplyChangeFailedEventArgs object provides information about the error or conflict that caused the failure. In a handler for the event, you can respond to the event in several ways, including specifying whether the synchronization provider should try to apply the row again. For more information, see How to: Work with Events and Program Business Logic and How to: Handle Data Conflicts and Errors.

The following code examples specify an event handler for the ApplyChangeFailed event. The method called logs information to separate files for the client and server synchronization providers. To view this code in the context of a complete example, see How to: Use Session Variables.

this.ApplyChangeFailed += new EventHandler<ApplyChangeFailedEventArgs>(EventLogger.LogEvents);

No code example is currently available or this language may not be supported.
ElseIf TypeOf e Is ApplyChangeFailedEventArgs Then

    Dim args As ApplyChangeFailedEventArgs = CType(e, ApplyChangeFailedEventArgs)
    outputText.AppendLine("** APPLY CHANGE FAILURE AT " & site.ToUpper() & " **")
    outputText.AppendLine("Table for which failure occurred: " & args.TableMetadata.TableName)
    outputText.AppendLine("Error message: " & args.Error.Message)


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
© 2015 Microsoft