Partager via


SPList.GetDataTable - Méthode

Retrieves a data table that contains item data that satisfies a query.

Espace de noms :  Microsoft.SharePoint
Assembly :  Microsoft.SharePoint (dans Microsoft.SharePoint.dll)

Syntaxe

'Déclaration
Public Function GetDataTable ( _
    query As SPQuery, _
    flags As SPListGetDataTableOptions, _
    <OutAttribute> ByRef position As SPListItemCollectionPosition _
) As DataTable
'Utilisation
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
)

Paramètres

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

Valeur renvoyée

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.

Exceptions

Exception Condition
ArgumentNullException

The query parameter is a null reference。

Voir aussi

Référence

SPList classe

SPList - Membres

Microsoft.SharePoint - Espace de noms

GetDataTable()

GetItems(SPQuery)

AppendDataTable(SPQuery, SPListGetDataTableOptions, DataTable, SPListItemCollectionPosition)

SPListItemCollectionPosition