SqlBatch.ExecuteDbDataReader(CommandBehavior) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Exécute le lot par rapport à sa connexion, en retournant un SqlDataReader élément qui peut être utilisé pour accéder aux résultats.
protected:
virtual System::Data::Common::DbDataReader ^ ExecuteDbDataReader(System::Data::CommandBehavior behavior);
protected:
override System::Data::Common::DbDataReader ^ ExecuteDbDataReader(System::Data::CommandBehavior behavior);
protected virtual System.Data.Common.DbDataReader ExecuteDbDataReader(System.Data.CommandBehavior behavior);
protected override System.Data.Common.DbDataReader ExecuteDbDataReader(System.Data.CommandBehavior behavior);
abstract member ExecuteDbDataReader : System.Data.CommandBehavior -> System.Data.Common.DbDataReader
override this.ExecuteDbDataReader : System.Data.CommandBehavior -> System.Data.Common.DbDataReader
override this.ExecuteDbDataReader : System.Data.CommandBehavior -> System.Data.Common.DbDataReader
Protected Overridable Function ExecuteDbDataReader (behavior As CommandBehavior) As DbDataReader
Protected Overrides Function ExecuteDbDataReader (behavior As CommandBehavior) As DbDataReader
Paramètres
- behavior
- CommandBehavior
Instance de , spécification d’options CommandBehaviorpour l’exécution par lots et la récupération des données. Seuls SequentialAccess et CloseConnection sont pris en charge au niveau du lot.
Retours
Un DbDataReader objet.
Exceptions
Une erreur s’est produite lors de l’exécution du lot.
La CommandBehavior valeur n’est pas valide.
Remarques
Lorsque le lot retourne plusieurs jeux de résultats à partir de différentes commandes, NextResult() vous pouvez l’utiliser pour faire passer le lecteur au jeu de résultats suivant.
Note
Cette méthode tire parti de ExecuteReader(CommandBehavior), et toutes les exceptions attendues de cette méthode s’appliquent également ici.