To retrieve the parameter information I use:
sp_sproc_columns @.Procedure_Name='InsertUser''
However, the column that is supposed to give the default value,'COLUMN_DEF' always returns as NULL, even when that column has adefault value assigned to it.
i.e.
CREATE PROCEDURE InsertUser
@.UserID INT = 10,
....
And then if I do a sp_sproc_columns @.Procedure_Name='InsertUser'', the COLUMN_DEF value for the @.UserID column is still NULL.
Does anyone know what I'm doing wrong and how I can retrieve the default value?
Thanks
It looks like you will have to parse the stored procedure code to get the default parameter info:
http://www.aspfaq.com/show.asp?id=2463
Hope this helps.
Chris R. Timmons
--------
C.R. Timmons Consulting, Inc.
http://www.crtimmonsinc.com/
Thanks for giving me an idea about how to perform this task. I will follow your suggestion and is going to make a post on the forum to learn about it.
ReplyDeleteinfopath signatures