Tech Off Thread

3 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

LINQ TO SQL Method Return Type Is Incorrect for a SP

Back to Forum: Tech Off
  • User profile image
    Secret​Software

    OKay,
        You have a stored procedure like this:
    Input = @L As Bit, @G As Bit.
    SELECT        X.*
    FROM            Y AS X
    WHERE        (X.D = @L AND @L IS NOT NULL) AND (X.T = @G AND
                             @G IS NOT NULL)
    ORDER BY X.U DESC

    Why does LINQ TO SQL make the return type int instead of ISingleResult?

  • User profile image
    JChung2006

    SET NOCOUNT ON causes stored procedures to return an int value.  Try SET NOCOUNT OFF in your stored procedure.

  • User profile image
    Secret​Software


    JChung2006 wrote:
    SET NOCOUNT ON causes stored procedures to return an int value.  Try SET NOCOUNT OFF in your stored procedure.


    But Its not set ON. Its off.

    Not sure why it keeps doing it.

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.