ISqlSession.ExecuteReader - Méthode (SqlCommand, CommandBehavior)

Exécute une requête Transact-SQL qui renvoie un jeu de lignes en fonction de la commande SQL spécifiée et le comportement.

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

Syntaxe

'Déclaration
Function ExecuteReader ( _
    command As SqlCommand, _
    behavior As CommandBehavior _
) As SqlDataReader
'Utilisation
Dim instance As ISqlSession
Dim command As SqlCommand
Dim behavior As CommandBehavior
Dim returnValue As SqlDataReader

returnValue = instance.ExecuteReader(command, _
    behavior)
SqlDataReader ExecuteReader(
    SqlCommand command,
    CommandBehavior behavior
)

Paramètres

Valeur renvoyée

Type : System.Data.SqlClient.SqlDataReader
Un objet SqlDataReader qui représente le jeu de lignes.

Remarques

La méthode ExecuteReader met en œuvre le comportement de l'objet CloseConnection .

Cette méthode lève une exception Exception en cas d'échec de la commande à exécuter.

Voir aussi

Référence

ISqlSession interface

ISqlSession - Membres

ExecuteReader - Surcharge

Microsoft.SharePoint.Utilities - Espace de noms