You are currently offline, waiting for your internet to reconnect

FIX: Some "Image" column content does not open in SQL Server Compact 3.5 SP2 after the "SqlCeEngine.Compact" or "SqlCeEngine.Repair" method is called

Extended support for SQL Server 2005 ends on April 12, 2016

If you are still running SQL Server 2005 after April 12, 2016, you will no longer receive security updates and technical support. We recommend upgrading to SQL Server 2014 and Azure SQL Database to achieve breakthrough performance, maintain security and compliance, and optimize your data platform infrastructure. Learn more about the options for upgrading from SQL Server 2005 to a supported version here.

SYMPTOMS
Consider the following scenario:
  • You have a database that includes an Image column in SQL Server Compact 3.5 Service Pack 2 (SP2).
  • You store some content in the Image column.
  • An application calls the SqlCeEngine.Compact or SqlCeEngine.Repair method that uses the RepariOption.RecoverAllorFail parameter to compact or repair the content.
  • An application opens the content from the destination database file.
In this scenario, the application might not open the content.

If you call the SqlCeEngine.Verify method to detect corruption in the destination database file, the method does not report any corruption.
CAUSE
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.
RESOLUTION

Hotfix information

A 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: Note 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.

Prerequisites

To apply this hotfix, you must have SQL Server Compact 3.5 Service Pack 2 (SP2) installed.

Restart requirement

You do not have to restart the computer after you apply the hotfix

Hotfix replacement information

This hotfix does not replace any other hotfixes.

File information

The 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
File nameFile versionFile sizeDateTimePlatform
System.data.sqlserverce.dll3.5.8083.0296,81603-Sep-201009:03x86
Entitypub.configNot Applicable56503-Sep-201005:03Not Applicable
Policy.3.5.system.data.sqlserverce.dll3.5.8083.010,09603-Sep-201009:03x86
Policy.3.5.system.data.sqlserverce.entity.dll3.5.8083.010,09603-Sep-201009:03x86
Publisher.configNot Applicable55803-Sep-201005:03Not Applicable
System.data.sqlserverce.dll3.5.8083.0296,81603-Sep-201009:03x86
System.data.sqlserverce.entity.dll3.5.8083.0231,28003-Sep-201009:03x86
Sqlceca35.dll3.5.8083.0342,38403-Sep-201009:02x86
Sqlcecompact35.dll3.5.8083.083,31203-Sep-201009:02x86
Sqlceer35en.dll3.5.8083.0147,31203-Sep-201009:02x86
Sqlceme35.dll3.5.8083.063,34403-Sep-201009:02x86
Sqlceoledb35.dll3.5.8083.0169,32803-Sep-201009:02x86
Sqlceqp35.dll3.5.8083.0640,88003-Sep-201009:02x86
Sqlcese35.dll3.5.8083.0361,84003-Sep-201009:02x86
System.data.sqlserverce.dll3.5.8083.0296,81603-Sep-201009:04x86
Microsoft.synchronization.data.dll1.0.1208.0115,74402-Sep-201004:30x86
Microsoft.synchronization.data.server.dll1.0.1208.0115,74402-Sep-201004:30x86
Microsoft.synchronization.data.sqlserverce.dll3.5.8083.092,01603-Sep-201009:03x86
Microsoft.synchronization.data.dll1.0.1208.0115,74402-Sep-201004:30x86
Microsoft.synchronization.data.server.dll1.0.1208.0115,74402-Sep-201004:30x86
Microsoft.synchronization.data.sqlserverce.dll3.5.8083.092,01603-Sep-201009:03x86
For x64-based versions of SQL Server Compact 3.5 SP2
File nameFile versionFile sizeDateTimePlatform
System.data.sqlserverce.dll3.5.8083.0296,81603-Sep-201009:10x86
System.data.sqlserverce.dll3.5.8083.0296,81603-Sep-201009:10x86
System.data.sqlserverce.entity.dll3.5.8083.0231,28003-Sep-201009:10x86
Sqlceca35.dll3.5.8083.0573,29603-Sep-201009:09x64
Sqlcecompact35.dll3.5.8083.0117,61603-Sep-201009:09x64
Sqlceer35en.dll3.5.8083.0147,82403-Sep-201009:09x64
Sqlceme35.dll3.5.8083.089,45603-Sep-201009:09x64
Sqlceoledb35.dll3.5.8083.0257,39203-Sep-201009:09x64
Sqlceqp35.dll3.5.8083.01,131,37603-Sep-201009:09x64
Sqlcese35.dll3.5.8083.0670,57603-Sep-201009:09x64
Microsoft.synchronization.data.dll1.0.1208.0115,74402-Sep-201004:30x86
Microsoft.synchronization.data.server.dll1.0.1208.0115,74402-Sep-201004:30x86
Microsoft.synchronization.data.sqlserverce.dll3.5.8083.092,01603-Sep-201009:10x86
Microsoft.synchronization.data.dll1.0.1208.0115,74402-Sep-201004:30x86
Microsoft.synchronization.data.server.dll1.0.1208.0115,74402-Sep-201004:30x86
Microsoft.synchronization.data.sqlserverce.dll3.5.8083.092,01603-Sep-201009:10x86
STATUS
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: For more information about the SqlCeEngine.Repair method, visit the following MSDN website: For more information about the SqlCeEngine.Verify method, visit the following MSDN website:
Properties

Article ID: 2361070 - Last Review: 09/20/2010 09:28:00 - Revision: 1.0

Microsoft SQL Server Compact 3.5, Microsoft SQL Server Compact 3.5 Service Pack 1 for Windows Mobile

  • kbautohotfix kbqfe kbhotfixserver kbfix kbsurveynew kbexpertiseadvanced KB2361070
Feedback
utoFirePV = 1; var varClickTracking = 1; var varCustomerTracking = 1; var Route = "76500"; var Ctrl = ""; document.write(" -repeat="language in languagesListForLargeScreens track by $index" class="col-sm-6 col-xs-24 ng-scope"> Paraguay - Español
Venezuela - Español
d=1&t=">html> var varCustomerTracking = 1; var Route = "76500"; var Ctrl = ""; document.write(" ')[0].appendChild(m);" onload="var m=document.createElement('meta');m.name='ms.dqp0';m.content='false';document.getElementsByTagName('head')[0].appendChild(m);" src="http://c1.microsoft.com/c.gif?"> ne; " src="https://c1.microsoft.com/c.gif?DI=4050&did=1&t=">