Repair a MSSQL Database
Repair method can be used to repair a corrupted database if the database has corrupted rows. Corrupted rows can be deleted by passing in the Delete corrupted rows Repair Option. If you do not want to do this then the corrupted rows can be recovered by passing in the Recover corrupted rows Repair Option. Use the following command.
engine.Repair(null, RepairOption.RecoverCorruptedRows);
By setting the case sensitive property in the connection string property of the repair method you can also create a case sensitive repaired database. Enter the command below to create a case sensitive database.
engine.Repair("Data Source= Test.sdf; LCID= 1033; Case Sensitive=true;", RepairOption.RecoverCorruptedRows);









































