description | title | ms.date | dev_langs | ms.assetid | ||
---|---|---|---|---|---|---|
Learn more about: How to: Use Stored Procedures Mapped for Sequential Result Shapes |
How to: Use Stored Procedures Mapped for Sequential Result Shapes |
03/30/2017 |
|
a73530de-5a4e-4d9c-8d66-abb19c225b11 |
This kind of stored procedure can generate more than one result shape, but you know in what order the results are returned. Contrast this scenario with the scenario where you do not know the sequence of the returns. For more information, see How to: Use Stored Procedures Mapped for Multiple Result Shapes.
Here is the T-SQL of a stored procedure that returns multiple result shapes sequentially:
CREATE PROCEDURE MultipleResultTypesSequentially
AS
select * from products
select * from customers
[!code-csharpDLinqSprox#6] [!code-vbDLinqSprox#6]
You would use code similar to the following to execute this stored procedure.
[!code-csharpDLinqSprox#7] [!code-vbDLinqSprox#7]