SQL Server 2005General discussion of SQL Server *2005* version only.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the SQL Server 2005 section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
I wrote a stored procedure that executes on the MS-SQL Server.
I would like to store the returned set of attributes in a variable that I can retrieve in my C# application. The procedure code looks like this:
CREATE PROCEDURE Select_InnerJoin_Memo
AS
SELECT Memo.Title, Memo.Body, Status.Status, Users.UserName AS
Author FROM Memo INNER JOIN Users ON Memo.MadeBy = Users.Id INNER JOIN Status ON Memo.Status = Status.Id
GO
EXECUTE Select_InnerJoin_Memo
The procedure returns the required results on the server but now I would like to get the returning attributes into a table variable so I can later use it in C# and fill a DataGridView. I allready declared a table variable like:
DECLARE @ResultSet TABLE
(
Title char(50),
Body char(50),
...
)
and put the '@ResultSet' = after the SELECT keyword but with no success .