Partilhar via


IRuntimeHelper.CreateDataTable Method (IEntityInstanceEnumerator, Int32)

Creates a DataTable with the data obtained from the given enumeration of External ItemExternal Items with a specified maximum number of rows.

Namespace:  Microsoft.BusinessData.Runtime
Assembly:  Microsoft.BusinessData (in Microsoft.BusinessData.dll)

Syntax

'Declaration
Function CreateDataTable ( _
    dataSource As IEntityInstanceEnumerator, _
    rowCount As Integer _
) As DataTable
'Usage
Dim instance As IRuntimeHelper
Dim dataSource As IEntityInstanceEnumerator
Dim rowCount As Integer
Dim returnValue As DataTable

returnValue = instance.CreateDataTable(dataSource, _
    rowCount)
DataTable CreateDataTable(
    IEntityInstanceEnumerator dataSource,
    int rowCount
)

Parameters

Return Value

Type: System.Data.DataTable
A DataTable that is populated with the data.

Remarks

This method will close the enumerator even if all the items are not read from the enumerator.

Instances of objects in the Business Data Connectivity object model are tied to the Metadata Store they are obtained from. Using instances tied to one Metadata Store with the instances from another Metadata Store will cause data corruption and other unexpected behavior. For more information, see DatabaseBackedMetadataCatalog, FileBackedMetadataCatalog, and RemoteSharedFileBackedMetadataCatalog.

See Also

Reference

IRuntimeHelper Interface

IRuntimeHelper Members

CreateDataTable Overload

Microsoft.BusinessData.Runtime Namespace