views:

46

answers:

1

Hi, I want to create generic function that will need only parameter as Stored procedure name and will return the collection of the parameter list of that stored procedure. how to achieve this in c#. OR another way :-

can we write the stored procedure that will have the parameter as names of another SP let say as varchar type, and will return the list of parameters of passed SP , in sql server ?

+3  A: 

You need to use the DeriveParameters method that belongs to the SqlCommandBuilder class.

Example here http://bit.ly/cFG6hI

Barry
good example! +1
Matt Ellen
Really this is what I was looking for.. thanks !
Lalit