I have a stored procedure ( test 1) that returns multiple select results and I would like to write the output ( both header and rows) into a text file using C#
For example, the output from SP looks like below (the sp has multiple select statements)
OrderID
1001
OrderItem OrderPlace
Book1 CA
Book2 NY
Book3 FL
OrderDate
01/02/2014
Orderby
James
Mike
And I would like to create a text file that includes above result from a sp using C#. How can I do this?