Article ID: 958478 - View products that this article applies to.
This article describes the following about this hotfix release:
Consider the following scenario. An application uses the Microsoft ADO.NET Entity Framework that is included in the Microsoft .NET Framework 3.5 Service Pack 1 to access a Microsoft SQL Server Compact 3.5 database. In the application, you run a "LINQ to Entities" query that uses a string parameter or a binary parameter against the database. In this scenario, you receive the following error message when you run the application:
The ntext and image data types cannot be used in WHERE, HAVING, GROUP BY, ON, or IN clauses, except when these data types are used with the LIKE or IS NULL predicates.
When you use parameters for a "LINQ to Entities" query in an application, you cannot specify the base database types. The SQL Server Compact Entity Framework provider tries to create a provider-level parameter based on the Entity Data Model (EDM) facets of the original parameter. SQL Server Compact does not support the nvarchar(max) data type or the varbinary(max) data type. Therefore, when the provider selects the data type for a parameter of the Edm.String data type or of the Edm.Binary data type, the provider has to mark the parameter as one of the following data types based on the EDM facets of the parameter:
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 the problem described in this article. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.
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, contact 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:
PrerequisitesTo apply this hotfix, you must uninstall the previously installed SQL Server Compact 3.5 Service Pack 1 to install the .msi file that is provided with this hotfix. If you do not uninstall the previously installed SQL Server Compact 3.5 Service Pack 1, you receive an installation error message that states that a later version of SQL Server Compact is already installed. For more information about SQL Server Compact 3.5 Service Pack 1, click the following article number to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/955965/ )Description of SQL Server Compact 3.5 Service Pack 1
Restart informationYou do not have to restart the computer after you apply this hotfix.
Registry informationYou do not have to change the registry.
Hotfix file informationThis hotfix contains only those files that are required to correct the issues that this article lists. This hotfix may not contain all the files that you must have to fully update a product to the latest build.
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.
Collapse this tableExpand this table
After you apply this hotfix, the provider does not guess the data type for a parameter of the EDM.String data type or of the EDM.Binary data type. The query processor selects the correct data type for the parameter based on the value or on the column to which the parameter is equated or with which the parameter is used.
For example, in the following Entity SQL query, the query processor selects the ntext data type for the name parameter before you apply this hotfix.
After you apply this hotfix, the data type of the First_Name column is selected for the name parameter.
However, in the following example, the "LINQ to Entity" query fails because the name parameter is neither equated to nor used with any other value or column.
This hotfix also resolves a known issue that is described in the readme document for SQL Server Compact 3.5. For more information, see the "SQL Server Compact 3.5 SP1 Runtime Issues for the ADO.NET Entity Framework" section of the following Microsoft Web site:
http://download.microsoft.com/download/2/e/c/2ec70436-aef2-4ccb-93a3-ea2f3e20f77d/ReadmeSSC35.htmThis hotfix resolves the issue that is related to incorrect Transact-SQL statements that are generated when the provider converts scalar subqueries to apply constructs.
Note The correlated subqueries are converted to scalar subqueries internally. The correlated subqueries are not supported in this release. When you run these queries, you receive the following error message:
The inner exception contains the following message:
An error occurred while executing the command definition. See the inner exception for details.
The reason is that the ADO.NET Entity Framework interprets the input query as a query that has the CROSS APPLY join type or the OUTER APPLY join type. If the right side of the join condition returns a scalar value, the join is converted into a scalar subquery. The ADO.NET Entity Framework provider for SQL Server Compact has to convert that scalar subquery to an equivalent query that has the OUTER APPLY join type, which is supported by the SQL Server Compact. However, in this release, this conversion is not done correctly. For example, an error occurs for the following query in this release.
There was an error parsing the query. [.., Token in error = AS ]
For more information about the naming schema for SQL Server updates, click the following article number to view the article in the Microsoft Knowledge Base:
822499For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/822499/ )New naming schema for Microsoft SQL Server software update packages
(http://support.microsoft.com/kb/824684/ )Description of the standard terminology that is used to describe Microsoft software updates