FIX: Error message in a database project that contains case-insensitive collations and uses a CTE with different cases in Microsoft Visual Studio Team System 2008 Database Edition GDR: "TSD03006: View: <view name> has an unresolved reference to object"

Article translations Article translations
Article ID: 970581 - View products that this article applies to.
Expand all | Collapse all

SYMPTOMS

Consider the following scenario in Microsoft Visual Studio Team System 2008 Database Edition GDR:
  • You create a Microsoft SQL Server database project.
  • You specify a case-insensitive collation from the Collation for database model drop-down list in the Project Settings window of the project property. For example, you select the English (United States) (1033) - CI collation item.
  • You add a view that uses a common table expression (CTE). Then, you mix uppercase characters and lowercase characters in the expression name of the CTE in the definition part and in the reference statement.
  • You save all the files to this database project.
In this scenario, you receive the following error message and warning message in the Error List window:
TSD03006: View: <view name> has an unresolved reference to object <upper-case of expression_name>.
TSD04152: The wildcard character in <upper-case of expression_name> could not be expanded.

CAUSE

This problem occurs because the Visual Studio interpreter handles the CTE expression name incorrectly. The interpreter does not follow the case-sensitive setting and treats the CTE expression name as case-insensitive

RESOLUTION

To resolve this problem, upgrade to Microsoft Visual Studio Team System 2008 Database Edition GDR R2. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
970479 List of fixed issues in the Microsoft Visual Studio Team System 2008 Database Edition GDR R2

Note Microsoft Visual Studio Team System 2008 Database Edition GDR R2 replaces Microsoft Visual Studio Team System 2008 Database Edition GDR.
To change the script that corresponds to the view so that the cases are the same.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

For more information about Using Common Table Expressions, visit the following Microsoft Web site:
http://msdn.microsoft.com/en-us/library/ms190766.aspx

Properties

Article ID: 970581 - Last Review: July 16, 2009 - Revision: 1.0
APPLIES TO
  • Microsoft Visual Studio Team System 2008 Database Edition
Keywords: 
kbpubtypekc kbhotfixserver kbexpertiseadvanced kbprb kbsurveynew kbqfe KB970581

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com