Compartilhar via


SmoCollectionBase.ClearAndInitialize Method

Definition

Clears old objects and initializes the collection

public void ClearAndInitialize (string filterQuery, System.Collections.Generic.IEnumerable<string> extraFields);
member this.ClearAndInitialize : string * seq<string> -> unit
Public Sub ClearAndInitialize (filterQuery As String, extraFields As IEnumerable(Of String))

Parameters

filterQuery
String

the xpath to filter the objects by properties (e.g. setting the filter to [(@IsSystemObject = 0)] will exclude the system objects from the result. By setting the parameter to null or empty string, no filter will be applied to the result

extraFields
IEnumerable<String>

the list of fields to be loaded in each object. (e.g. setting the extraFields to "new string[] { "IsSystemVersioned" })" when calling this method for TableCollection will include "IsSystemVersioned" property for each table object. By setting the parameter to null or empty array, only the default fields will be included in the result

Applies to