SqlCeEngine engine = new SqlCeEngine("data source=D:\WPF_Database\dbname.sdf;;password=111");
if (false == engine.Verify())
{
engine.Repair(null, RepairOption.RecoverCorruptedRows);
MessageBox.Show("数据库引擎修复完成.");
}