This documentation is archived and is not being maintained.

SqlCeConnection.FlushFailure Event

Occurs when the background flush fails.

Namespace: System.Data.SqlServerCe
Assembly: System.Data.SqlServerCe (in

public event SqlCeFlushFailureEventHandler FlushFailure
/** @event */
public void add_FlushFailure (SqlCeFlushFailureEventHandler value)

/** @event */
public void remove_FlushFailure (SqlCeFlushFailureEventHandler value)

In JScript, you can handle the events defined by a class, but you cannot define your own.
Not applicable.

The following example shows how to use the FlushFailure event.

// using System;
// using System.Xml;
// using System.Data;
// using System.Data.SqlServerCe;
// using System.Data.Common;
// using System.Windows.Forms;
/// <summary>
/// Demonstrates the usage of the FlushFailure event
/// </summary>
public class MyForm : Form
	public void Snippet4()
		SqlCeConnection conn = new SqlCeConnection();
		conn.FlushFailure+=new SqlCeFlushFailureEventHandler(conn_FlushFailure);

		//Flush failure occurs here
		//OnFlushFailure will be called from the background thread.
	void conn_FlushFailure(object sender, SqlCeFlushFailureEventArgs e)
		SqlCeErrorCollection errors = e.Errors;
		Console.WriteLine("Flush Failure:" + errors[0].Message);

Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows XP Professional x64 Edition, Windows XP SP2

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

.NET Compact Framework

Supported in: 2.0