FIX: Error message when you use the FOR XML AUTO mode and run static code analysis by using the SR0014 rule in Microsoft Visual Studio Team System 2008 Database Edition GDR: "Value cannot be null"

Article translations Article translations
Article ID: 970565 - 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 SQL Server database project by using.
  • You add a stored procedure to the project. The stored procedure implicitly converts one data type to another data type.
  • You use the FOR XML clause and the AUTO mode to retrieve XML query results from the database.
  • Then, you select the SR0014 rule under the Microsoft.Design category in the code analysis configuration.
In this scenario, when you click Run in the Static Code Analysis item of the Data menu, you receive the following error message in the Error List window:
An exception was thrown when the 'Maintain compatibility between data types.' rule was applied. The exception text is: 'Value cannot be null. Parameter name: expression'.

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.

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 how to improve the database code with static analysis, visit the following Microsoft Web site:
http://msdn.microsoft.com/en-us/library/dd172133.aspx

Properties

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

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