In native code, you use the ErrorRecords property to collect and report engine-related errors. In managed code, errors are handled by the SqlCeException class of the .NET Compact Framework Data Provider for SQL Server Compact 3.5.