SqlCeErrorCollection Class
.NET Framework 2.0
Collects all errors generated by the .NET Compact Framework Data Provider for SQL Server Mobile. This class cannot be inherited.
Namespace: System.Data.SqlServerCe
Assembly: System.Data.SqlServerCe (in system.data.sqlserverce.dll)
Assembly: System.Data.SqlServerCe (in system.data.sqlserverce.dll)
This class is created by SqlCeException to collect instances of the SqlCeError class. SqlCeErrorCollection always contains at least one instance of the SqlCeError class.
The following example displays each SqlCeError within the SqlCeErrorCollection collection.
Public Sub DisplaySqlCeErrors(ByVal errorCollection As SqlCeErrorCollection) Dim err As SqlCeError Dim bld As New StringBuilder() For Each err In errorCollection bld.Append((ControlChars.Cr & " Error Code: " & err.HResult.ToString("X"))) bld.Append((ControlChars.Cr & " Message : " & err.Message)) bld.Append((ControlChars.Cr & " Minor Err.: " & err.NativeError)) bld.Append((ControlChars.Cr & " Source : " & err.Source)) Dim numPar As Integer For Each numPar In err.NumericErrorParameters If 0 <> numPar Then bld.Append((ControlChars.Cr & " Num. Par. : " & numPar)) End If Next numPar Dim errPar As String For Each errPar In err.ErrorParameters If [String].Empty <> errPar Then bld.Append((ControlChars.Cr & " Err. Par. : " & errPar)) End If Next errPar MessageBox.Show(bld.ToString()) bld.Remove(0, bld.Length) Next err End Sub 'DisplaySqlCeErrors
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: