ISqlSession.ExecuteReader method (SqlCommand)
Executes a Transact-SQL query that returns a rowset based on the specified SQL command.
Namespace: Microsoft.SharePoint.Utilities
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Function ExecuteReader ( _
command As SqlCommand _
) As SqlDataReader
'Usage
Dim instance As ISqlSession
Dim command As SqlCommand
Dim returnValue As SqlDataReader
returnValue = instance.ExecuteReader(command)
SqlDataReader ExecuteReader(
SqlCommand command
)
Parameters
command
Type: System.Data.SqlClient.SqlCommandA SqlCommand object that represents the Transact-SQL query to execute.
Return value
Type: System.Data.SqlClient.SqlDataReader
A SqlDataReader object that represents the rowset.
Remarks
The ExecuteReader method enforces CloseConnection object behavior.
This method throws a Exception exception if the command fails to execute.