SqlCeConnection.FlushFailure Event
Visual Studio 2010
Occurs when the background flush fails.
Namespace: System.Data.SqlServerCe
Assembly: System.Data.SqlServerCe (in System.Data.SqlServerCe.dll)
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); } }
