Compartilhar via


SPList.AppendDataTable Method

Appends the results returned by a query to an existing data table.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Available in SharePoint Online

Syntax

'Declaration
<SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.ShimmedTypeOutParam)> _
Public Sub AppendDataTable ( _
    query As SPQuery, _
    flags As SPListGetDataTableOptions, _
    dataTable As DataTable, _
    <OutAttribute> ByRef position As SPListItemCollectionPosition _
)
'Usage
Dim instance As SPList
Dim query As SPQuery
Dim flags As SPListGetDataTableOptions
Dim dataTable As DataTable
Dim position As SPListItemCollectionPosition

instance.AppendDataTable(query, flags, _
    dataTable, position)
[SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.ShimmedTypeOutParam)]
public void AppendDataTable(
    SPQuery query,
    SPListGetDataTableOptions flags,
    DataTable dataTable,
    out SPListItemCollectionPosition position
)

Parameters

  • query
    Type: Microsoft.SharePoint.SPQuery

    The query that will be used to select data. Only the fields that are specified in the query are returned.

Exceptions

Exception Condition
ArgumentException

The argument to the dataTable parameter is a null reference (Nothing in Visual Basic), or the number of columns in the data table does not match the number of fields returned by the query.

See Also

Reference

SPList Class

SPList Members

Microsoft.SharePoint Namespace

GetDataTable(SPQuery, SPListGetDataTableOptions, SPListItemCollectionPosition)