0
As per the error provided, you are using SQL CE and there is a good article (https://technet.microsoft.com/en-us/library/ms172420.aspx) to clean up the corrupted rows (which leads to above error).
Before you go with below approach, make sure to back up your database so that you won't loose any data if needed.
try writing small console app with below code
- SqlCeEngine engine = new SqlCeEngine("Data Source = AdventureWorks.sdf");
-
- if (false == engine.Verify())
- {
- MessageBox.Show("Database is corrupted.");
- engine.Repair(null, RepairOption.RecoverAllorFail);
- }