views:

48

answers:

1

Hello.
I have the following stored procedure

ALTER PROCEDURE [dbo].Test
AS
BEGIN
    CREATE TABLE ##table
    (
        ID1 int,
        ID2 int
    )

    DECLARE @query varchar(MAX);

    INSERT INTO ##table VALUES(1, 1);

    SELECT * FROM ##table;
END

And I try to use it from C# code. I use LINQ to SQL as an O/RM. When I add the procedure to DataBaseContext it says that it can't figure out the return value of this procedure. How to modify the stored procedure so that I can use it with LINQ to SQL.

Note: I need to have global template table!

A: 

Try identifying the columns in your select.

SELECT ID1, ID2 FROM ##table;
Jim
It doesn't help =(
StuffHappens
Check this link http://msdn.microsoft.com/en-us/library/bb384575.aspx
Jim