Share via


IRuntimeHelper.CreateDataTable Method (IEntityInstanceEnumerator, Int32, Int32)

Creates a DataTable with the data obtained from the given enumeration of External Items with a specified maximum number of rows and option to skip the given number of items.

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

Syntax

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

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

Parameters

  • offsetFromStart
    Type: System.Int32

    The number External Items to skip from the start of the enumeration.

Return Value

Type: System.Data.DataTable
A DataTable that is populated with the data obtained from the specified entity instance enumerator.

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