Partager via


SqlSmoObject.InitChildCollection(Urn, Boolean) Method

Definition

Initializes the child object collection associated with the given type. For example, the name Column would initialize the Columns collection.

public void InitChildCollection (Microsoft.SqlServer.Management.Sdk.Sfc.Urn childType, bool forScripting);
member this.InitChildCollection : Microsoft.SqlServer.Management.Sdk.Sfc.Urn * bool -> unit
Public Sub InitChildCollection (childType As Urn, forScripting As Boolean)

Parameters

childType
Urn

The type of child object collection to initialize.

forScripting
Boolean

When true, the set of properties needed to script the objects in the collection will be fetched in the query. When false, only the default properties will be fetched. Use Server.SetDefaultInitFields to control the property set.

Remarks

If the childType Urn specifies multiple levels like "PartitionFunction/PartitionFunctionParameter", the application should have already initialized the first level in the Urn before initializing the second level.

Applies to