Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

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

[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.

flags
Type: Microsoft.SharePoint.SPListGetDataTableOptions

An enumeration value that specifies options for populating the data table with the values of fields in list items.

dataTable
Type: System.Data.DataTable

A data table to receive the results of the query.

position
Type: Microsoft.SharePoint.SPListItemCollectionPosition

A reference to an object that will receive paging information.

ExceptionCondition
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.

Show:
© 2015 Microsoft