Export (0) Print
Expand All
Expand Minimize

RepairOption Enumeration

When passed to the Repair method, RepairOption specifies the type of database repair to perform.

Namespace:  System.Data.SqlServerCe
Assembly:  System.Data.SqlServerCe (in System.Data.SqlServerCe.dll)

public enum RepairOption

Member nameDescription
DeleteCorruptedRowsDeletes all corrupted rows without attempting to fix them.
RecoverCorruptedRows Obsolete. Attempts to fix all corrupted rows rather than deleting them.
RecoverAllPossibleRowsFixes all of the corrupted rows that it is possible to fix. Rows that cannot be fixed are left unmodified.
RecoverAllOrFailAttempts to fix all corrupted rows. If not all of the rows can be fixed, none of them are modified and the operation fails.

When using the RepairOption's DeleteCorruptedRows value, all corrupted pages are discarded from the database. This may result in significant data loss, but the data that is recovered using this option will be free from corruption.

When using the RepairOption's [FF:System.Data.SqlServerCe.RepairOption.RecoverAllOrFail] value, the database will attempt to read data from all of the corrupted pages; however, the database is updated only if all of the data can be recovered. This option guarantees that either all of the data is recovered free of corruption, or that none of it is recovered.

When using the RepairOption's [FF:System.Data.SqlServerCe.RepairOption.RecoverAllPossibleRows] value, the database will attempt to read data only from the corrupted pages that can be recovered. This option guarantees that the data recovered will be free of corruption; however not all data may be recovered.

When using the RepairOption's RecoverCorruptedRows value, the database will attempt to read data from the corrupted pages. This potentially results in more data being recovered, but this option does not guarantee that the data recovered will be free of corruption.

Show:
© 2014 Microsoft