October 2010
Intermediate to advanced
1920 pages
73h 55m
English
Creating a stored procedure with .NET Framework is easy. All you need to do is decorate a method with the SqlProcedure attribute.
The method used for the stored procedure must satisfy two requirements. The method must be a shared (static) method. Furthermore, the method must be implemented either as a subroutine or as a function that returns an integer value.
Within your method, you can take advantage of the SqlPipe class to send results back to your application. The SqlPipe class supports the following methods:
• Send()—
Enables you to send a DataReader, single-row resultset, or string.
• ExecuteAndSend()—
Enables you to execute a SqlCommand and send the results.
• SendResultsStart()—
Enables you to initiate ...
Read now
Unlock full access