Share via


SfcObjectQuery.ExecuteIterator Method

Definition

Execute the query string and return an SfcObjectIterator to enumerate the results without caching them. If MultipleActiveQueries is true, then you must either provide a suitable connection when requests by GetConnection or use the ExecuteCachedIterator instead to avoid this issue.

public System.Collections.IEnumerable ExecuteIterator (Microsoft.SqlServer.Management.Sdk.Sfc.SfcQueryExpression query, string[] fields, Microsoft.SqlServer.Management.Sdk.Sfc.OrderBy[] orderByFields);
member this.ExecuteIterator : Microsoft.SqlServer.Management.Sdk.Sfc.SfcQueryExpression * string[] * Microsoft.SqlServer.Management.Sdk.Sfc.OrderBy[] -> System.Collections.IEnumerable
Public Function ExecuteIterator (query As SfcQueryExpression, fields As String(), orderByFields As OrderBy()) As IEnumerable

Parameters

query
SfcQueryExpression

The query string to process.

fields
String[]

The field names to retrieve. If null, all default inexpensive fields are retrieved.

orderByFields
OrderBy[]

Returns

A SfcObjectIterator to enumerate the results. This is suitable for IEnumerable use and must be disposed when done.

Applies to