problems with return parameter of store procedure

  • Can you give snippets of your C# and T-SQL stored procedure? Make sure that you clean up any code to hide anything that might be sensitive your organization. That would help us figure out what's going on.

    K. Brian Kelley
    @kbriankelley

  • You need to look at your C# parameter set up. It was confused while I used that.

  • The return value of a stored proc is always an int.  If you use a smaller type, like tinyint or smallint, it will be converted. If you try to return something like a varchar, it will return an error.

    You can use an OUTPUT parameter to return a different type.

    Dylan Peters
    SQL Server DBA

  • You might consider using a user defined function rather than a stored procedure.

Viewing 4 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply