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)
Syntax
'Declaration
Public Enumeration RepairOption
'Usage
Dim instance As RepairOption
public enum RepairOption
public enum class RepairOption
type RepairOption
public enum RepairOption
Members
Member name | Description | |
---|---|---|
DeleteCorruptedRows | Deletes all corrupted rows without attempting to fix them. | |
RecoverCorruptedRows | Obsolete. Attempts to fix all corrupted rows rather than deleting them. | |
RecoverAllPossibleRows | Fixes all of the corrupted rows that it is possible to fix. Rows that cannot be fixed are left unmodified. | |
RecoverAllOrFail | Attempts to fix all corrupted rows. If not all of the rows can be fixed, none of them are modified and the operation fails. |
Remarks
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.