SqlPipe Class

SqlPipe Class


Allows managed stored procedures running in-process on a SQL Server database to return results back to the caller. This class cannot be inherited.

Namespace:   Microsoft.SqlServer.Server
Assembly:  System.Data (in System.Data.dll)


public sealed class SqlPipe


Gets a value that indicates whether the SqlPipe is in the mode of sending single result sets back to the client. This property is read-only.


Determines whether the specified object is equal to the current object.(Inherited from Object.)


Executes the command passed as a parameter and sends the results to the client.


Serves as the default hash function. (Inherited from Object.)


Gets the Type of the current instance.(Inherited from Object.)


Sends a multirow result set directly to the client or current output consumer.


Sends a single-row result set directly to the client or current output consumer.


Sends a string message directly to the client or current output consumer.


Marks the end of a result set, and returns the SqlPipe instance back to the initial state.


Sends a single row of data back to the client.


Marks the beginning of a result set to be sent back to the client, and uses the record parameter to construct the metadata that describes the result set.


Returns a string that represents the current object.(Inherited from Object.)

An instance of this class is made available to managed stored procedures through the Pipe property of the SqlContext class.

The following example uses SqlConnection and SqlCommand to select rows from a data source in a stored procedure. The example then uses a SqlPipe to execute the command and send the results back to the client.

Snippet section 1 of code snippet {"project_id":"3fedad16-eaf1-41a6-8f96-0c1949c68f32","entity_id":"a8c897be-136f-4935-8709-30f56139e0fb","entity_type":"CodeSnippet","locale":"en-US"} in source file ({"filename":"/CS/source.cs","blob_type":"Source","blob_id":"-002fcs-002fsource-002ecs","blob_revision":3}), line 8 is missing the closing tag.

.NET Framework
Available since 2.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
© 2015 Microsoft