FIX: You receive a "TSD03147" error message when you have a SQL view which uses the SCHEMABINDING option and the CAST statement in a Microsoft SQL Server database project in Microsoft Visual Studio Team System 2008 Database Edition GDR

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

SYMPTOMS

You have a SQL view which uses the SCHEMABINDING option in a Microsoft SQL Server database project in Microsoft Visual Studio Team System 2008 Database Edition GDR. If the view uses the CAST statement to convert the data type of a column in the SQL view, you receive an error message that resembles the following in the Error List window:

TSD03127: Cannot schema bind view ‘View_Name' because name 'type_name' is invalid for schema binding. Names must be in two-part format and an object cannot reference itself.

CAUSE

This problem occurs because the compiler treats the data type as the column name.

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.

WORKAROUND

To work around this problem, use the full qualified type name. For example, you must use sys.varchar(10) instead of varchar(10).

MORE INFORMATION

For more information about CAST and CONVERT, visit the following Microsoft Developer Network (MSDN) Web site:
http://msdn.microsoft.com/en-us/library/aa226054(SQL.80).aspx

Properties

Article ID: 970572 - Last Review: July 16, 2009 - Revision: 1.0
APPLIES TO
  • Microsoft Visual Studio Team System 2008 Database Edition
Keywords: 
kbexpertiseadvanced kbsurveynew kbqfe KB970572

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