Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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.SPQueryThe query that will be used to select data. Only the fields that are specified in the query are returned.
flags
Type: Microsoft.SharePoint.SPListGetDataTableOptionsAn enumeration value that specifies options for populating the data table with the values of fields in list items.
dataTable
Type: System.Data.DataTableA data table to receive the results of the query.
position
Type: Microsoft.SharePoint.SPListItemCollectionPositionA reference to an object that will receive paging information.
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
Microsoft.SharePoint Namespace
GetDataTable(SPQuery, SPListGetDataTableOptions, SPListItemCollectionPosition)