SqlCeConnection.FlushFailure Event
.NET Framework 2.0
Occurs when the background flush fails.
Namespace: System.Data.SqlServerCe
Assembly: System.Data.SqlServerCe (in system.data.sqlserverce.dll)
Assembly: System.Data.SqlServerCe (in system.data.sqlserverce.dll)
'Declaration Public Event FlushFailure As SqlCeFlushFailureEventHandler 'Usage Dim instance As SqlCeConnection Dim handler As SqlCeFlushFailureEventHandler AddHandler instance.FlushFailure, handler
/** @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.
Public Sub Snippet4() Dim conn As SqlCeConnection = Nothing Try conn = New SqlCeConnection("Data Source = MyDatabase.sdf; Password ='<pwd>'") AddHandler conn.FlushFailure, AddressOf conn_FlushFailure conn.Open() 'Flush failure occurs here 'OnFlushFailure will be called from the background thread. Finally conn.Close() End Try End Sub Private Sub conn_FlushFailure(ByVal sender As System.Object, ByVal e As SqlCeFlushFailureEventArgs) Dim errors As SqlCeErrorCollection = e.Errors Console.WriteLine("Flush Failure: " + errors(0).Message) End Sub
Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows XP Professional x64 Edition, Windows XP SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
Community Additions
ADD
Show: