none
How to call stored procedure using LINQ to SQL RRS feed

  • Question

  • Hi Experts,

               i have a stored procedure as:

    CREATE procedure dbo.LINQSP 
    (
    @tblName varchar(50)
    )
    AS
    begin
    declare @SQLString varchar(8000)
    set @SQLString = 'select * from '
    set @SQLString = @SQLString + @tblName
    execute(@SQLString)
    end

     

     

    how do i call this stored procedure from my aspx.cs file, then push and display the data into the GridView control, using LINQ methodolgy.

    Note:Using a normal select statement stored procedure i am able to execute and display the data into the GridView control, but not in above.
    Sample code would be greatly appreciated!



    Chinni Krishna
    • Moved by Diego B Vega [MSFT] Tuesday, July 21, 2009 4:22 AM wrong forum (From:LINQ to SQL (Pre-Release))
    Monday, July 13, 2009 8:32 AM

All replies