Ask Learn
Preview
Please sign in to use this experience.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
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.
Retrieves a data table that contains item data that satisfies a query.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
'Declaration
Public Function GetDataTable ( _
query As SPQuery, _
flags As SPListGetDataTableOptions, _
<OutAttribute> ByRef position As SPListItemCollectionPosition _
) As DataTable
'Usage
Dim instance As SPList
Dim query As SPQuery
Dim flags As SPListGetDataTableOptions
Dim position As SPListItemCollectionPosition
Dim returnValue As DataTable
returnValue = instance.GetDataTable(query, _
flags, position)
public DataTable GetDataTable(
SPQuery query,
SPListGetDataTableOptions flags,
out SPListItemCollectionPosition position
)
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.
position
Type: Microsoft.SharePoint.SPListItemCollectionPosition
A reference to an object that will receive paging information.
Type: System.Data.DataTable
A data table that contains the result of the query. Each row in the table represents a list item that satisfies the query. Each column represents a field that was specified in the query.
Exception | Condition |
---|---|
ArgumentNullException | The query parameter is a null reference。 |
Microsoft.SharePoint namespace
AppendDataTable(SPQuery, SPListGetDataTableOptions, DataTable, SPListItemCollectionPosition)
Please sign in to use this experience.
Sign in