Thursday, July 24, 2008

HIERARCHYID Error: Could not find method 'Reparent'

If you are using SQL Server 2008 RC0 and try to run a piece of code written with the previous version, using the Reparent() method of HIERARCHYID data type, you will get the following error:

Could not find method 'Reparent' for type 'Microsoft.SqlServer.Types.SqlHierarchyId' in assembly 'Microsoft.SqlServer.Types'

This method is renamed to GetReparentedValue in RC0. Use GetReparentedValue() instead of Reparent().

0 comments: