Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

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

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

		conn.Open();
		
		//Flush failure occurs here
		//OnFlushFailure will be called from the background thread.

		conn.Close();		
	}
	void conn_FlushFailure(object sender, SqlCeFlushFailureEventArgs e)
	{
		SqlCeErrorCollection errors = e.Errors;
		Console.WriteLine("Flush Failure:" + errors[0].Message);
	}
}


Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.