SqlCeConnection.FlushFailure Event

Occurs when the background flush fails.

Namespace: System.Data.SqlServerCe
Assembly: System.Data.SqlServerCe (in system.data.sqlserverce.dll)

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

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

JScript supports the use of events, but not the declaration of new ones.

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);

Development Platforms

Windows Vista, Windows Mobile 5.0, Windows XP Professional with Service Pack 2 (SP2), Windows Server 2003, Windows Mobile 2003 for Pocket PC, Windows CE 5.0
Version Information
.NET Framework and NET Compact Framework
Supported in 3.5
.NET Framework
Supported in 3.0
.NET Compact Framework and .Net Framework
Supported in 2.0