다음을 통해 공유


IRuntimeHelper.CreateDataTable Method (IEntityInstanceEnumerator, Boolean)

Creates a DataTable with the data obtained from the given enumeration of External ItemExternal Items, with an option to create an extra column to store identities of the External ItemExternal Items.

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

Syntax

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

returnValue = instance.CreateDataTable(dataSource, _
    createSerializedIdColumn)
DataTable CreateDataTable(
    IEntityInstanceEnumerator dataSource,
    bool createSerializedIdColumn
)

Parameters

  • createSerializedIdColumn
    Type: System.Boolean

    true to create an additional column with the serialized identifier values of the External ItemExternal Items; otherwise, false.

Return Value

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

Remarks

This method will consume and close the enumerator. The name of the column which contains identifier values will be “BdcIdentity”.

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