• Sideout72 (10/26/2007)


    Jereme Guenther (10/25/2007)


    So what is the advantage of OUTPUT parameters over a standard result set? From my experience they are much more of a pain to deal with both in coding and in maintenance.

    Think of using a stored procedure like you would use any fuction in traditional coding.

    You have parameters that could be "in", "out", or "in/out" for a function. Think of OUTPUT parameters in a stored procedure like "in/out" for a function.

    You also have a return value for a function. Think of a standard result set in a stored procedure like the return value for a function. Of course, that return value for a function could be multiple types - XML would be most like a standard SP result set.

    Hope that helps.

    That does make sense. I find output parameters in functions to be cumbersome as well, though they have been useful on occasion.

    Also this comparison is great for the functional side of things, but implementation wise it is much more of a pain to implement output parameters in a sproc than it is in a .NET function.