I'm working on something where I wanted to know if some parameters to a SQL Server Stored Procedure were nullable (or, in otherwords, if they had a default value).
The API I was working with provided a way to find info about the SP, but the isNullable value was never accurate.
I tried working with with the MS DAABs which have a way to fetch SP parameter info, but this method also produced faulty information.
Looking into the code of the DAAB, it was internally calling:
Dim command As SqlCommand SqlCommandBuilder.DeriveParameters(command)
Somewhere I came across some code for the DeriveParameters method (I think from the Mono project maybe?) which showed it calling this system SP:
sp_procedure_params_rowset
Which returns output fields,:
PARAMETER_HASDEFAULTIS_NULLABLE
But, again, neither of these appear correctly.
However, I finally came across this thread where a MSFT poster indicates that this data is simply not available:
http://social.msdn.microsoft.com/forums/en-US/transactsql/thread/900756fd-3980-48e3-ae59-a15d7fc15b4c/
Instead, you need to parse the SP definition to see what the default parameter value is, which is a pain, but at least I know why these other methods kept not working.
Remember Me
Powered by: newtelligence dasBlog 2.3.9074.18820
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
E-mail
Theme design by Jelle Druyts