Once devs are pushed toward using parameters, they get confused as to why their sp is not reused and has many compilations when in use.
The reason is most of the time, that the parameters are defined with a wrong datatypemapping in the application or have different datatypes in a # of applications.
I use this proc the generate the .Net-code to define and use the parameters for a commandobject named sqlcmd. A simple copy/paste helps out in this case.
It is primitive, and it may have some flaws, but it helps out in 90 % ...
Creating a PDF from a Stored Procedure in SQL Server
A short but interesting article, the author has figured out a way to create a PDF from a stored procedure without using a third party library.
2019-09-20 (first published: 2003-08-26)
73,119 reads