Verify Method
Collapse the table of content
Expand the table of content

SqlCeEngine.Verify Method

Recalculates the checksums for each page in the database and compares the new checksums to the expected values.

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

public bool Verify ()
public boolean Verify ()
public function Verify () : boolean

Return Value

True if the checksums match and there is no database corruption; otherwise, false.

If this method returns false, the database is corrupt, and your application should call the Repair method to correct the problem.

SqlCeEngine engine = new SqlCeEngine("Data Source = AdventureWorks.sdf");

if (false == engine.Verify())
    MessageBox.Show("Database is corrupted.");
    engine.Repair(null, RepairOption.RecoverCorruptedRows);

  • Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see .

Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows XP Professional x64 Edition, Windows XP SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Compact Framework

Supported in: 2.0

Community Additions

© 2016 Microsoft