Article ID: 2361070 - View products that this article applies to.
Consider the following scenario:
If you call the SqlCeEngine.Verify method to detect corruption in the destination database file, the method does not report any corruption.
This issue occurs because the SqlCeEngine.Compact or SqlCeEngine.Repair method changes the data length of the database file.
These methods read every record in the source database file and write the records to the destination database file. These methods use a block size that differs from the original source to store the image data. However, these methods align the data to block boundaries by adding zeros to the end of the data before these methods insert the data into the destination database file. Therefore, the resulting data length incorrectly includes the added zeros, and the length is interpreted as a new size when the data is read from the destination database file.
Note The SqlCeEngine.Verify method checks for disk corruption and for a valid page checksum. However, the method does not check the actual image data type. Therefore, the method does not report any issue.
Hotfix informationA supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem.
If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, submit a request to Microsoft Customer Service and Support to obtain the hotfix.
Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=supportNote The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.
PrerequisitesTo apply this hotfix, you must have SQL Server Compact 3.5 Service Pack 2 (SP2) installed.
Restart requirementYou do not have to restart the computer after you apply the hotfix
Hotfix replacement informationThis hotfix does not replace any other hotfixes.
File informationThe English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
For x86-based versions of SQL Server Compact 3.5 SP2
Collapse this tableExpand this table
For x64-based versions of SQL Server Compact 3.5 SP2
Collapse this tableExpand this table
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
For more information about the SqlCeEngine.Compact method, visit the following Microsoft Developer Network (MSDN) website:
General information about the "SqlCeEngine.Compact" methodFor more information about the SqlCeEngine.Repair method, visit the following MSDN website:
General information about the "SqlCeEngine.Repair" methodFor more information about the SqlCeEngine.Verify method, visit the following MSDN website:
General information about the "SqlCeEngine.Verify" method