다음을 통해 공유


SqlHierarchyId.GetReparentedValue(SqlHierarchyId, SqlHierarchyId) Method

Definition

Gets a value representing the location of a new SqlHierarchyId node that has a path from newRoot equal to the path from oldRoot to this, effectively moving this to the new location.

[Microsoft.SqlServer.Server.SqlMethod(DataAccess=Microsoft.SqlServer.Server.DataAccessKind.None, InvokeIfReceiverIsNull=false, IsDeterministic=true, IsMutator=false, IsPrecise=true, OnNullCall=false, SystemDataAccess=Microsoft.SqlServer.Server.SystemDataAccessKind.None)]
public Microsoft.SqlServer.Types.SqlHierarchyId GetReparentedValue (Microsoft.SqlServer.Types.SqlHierarchyId oldRoot, Microsoft.SqlServer.Types.SqlHierarchyId newRoot);
[<Microsoft.SqlServer.Server.SqlMethod(DataAccess=Microsoft.SqlServer.Server.DataAccessKind.None, InvokeIfReceiverIsNull=false, IsDeterministic=true, IsMutator=false, IsPrecise=true, OnNullCall=false, SystemDataAccess=Microsoft.SqlServer.Server.SystemDataAccessKind.None)>]
member this.GetReparentedValue : Microsoft.SqlServer.Types.SqlHierarchyId * Microsoft.SqlServer.Types.SqlHierarchyId -> Microsoft.SqlServer.Types.SqlHierarchyId
Public Function GetReparentedValue (oldRoot As SqlHierarchyId, newRoot As SqlHierarchyId) As SqlHierarchyId

Parameters

oldRoot
SqlHierarchyId

An ancestor of the SqlHierarchyId node specifying the endpoint of the path segment that is to be moved.

newRoot
SqlHierarchyId

The SqlHierarchyId node that represents the new ancestor of this.

Returns

A SqlHierarchyId node representing the new hierarchical location of this. Will return null if oldRoot, newRoot, or thisare null.

Attributes

Applies to