Aracılığıyla paylaş


ISqlSession.ExecuteReader Method (SqlCommand, CommandBehavior)

Executes a Transact-SQL query that returns a rowset based on the specified SQL command and behavior.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Function ExecuteReader ( _
    command As SqlCommand, _
    behavior As CommandBehavior _
) As SqlDataReader
'Usage
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
)

Parameters

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.

See Also

Reference

ISqlSession Interface

ISqlSession Members

ExecuteReader Overload

Microsoft.SharePoint.Utilities Namespace