SqlCeException Class
.NET Framework 3.0
The exception thrown when the underlying provider returns a warning or error from a Microsoft SQL Server 2005 Compact Edition data source. 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 whenever the .NET Compact Framework Data Provider for SQL Server Compact Edition encounters an error generated from within the SQL Server Compact Edition Engine. (Other errors are thrown as standard common language runtime exceptions.) SqlCeException always contains at least one instance of SqlCeError.
The following example generates a SqlCeException due to a missing data source, and then displays the exception.
Dim conn As New SqlCeConnection("Data Source=nonExistingSource.sdf;") Try conn.Open() Catch e As SqlCeException ' Use SqlCeException properties if you need specific ' application logic depending on the error condition ' If 25046 = e.NativeError Then 'SSCE_M_FILENOTFOUND ' Error specific logic goes here... ' End If MessageBox.Show(e.Message) End Try
System.Object
System.Exception
System.SystemException
System.Data.SqlServerCe.SqlCeException
System.Data.SqlServerCe.SqlCeLockTimeoutException
System.Data.SqlServerCe.SqlCeTransactionInProgressException
System.Exception
System.SystemException
System.Data.SqlServerCe.SqlCeException
System.Data.SqlServerCe.SqlCeLockTimeoutException
System.Data.SqlServerCe.SqlCeTransactionInProgressException
Community Additions
ADD
Show: