Is there a sane way to get a list of expected parameters from an SqlDataSource given the name of the stored procedure assigned to its SelectCommand property?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use the SqlCommandBuilder.DeriveParameters method to return information on the parameters associated with a stored procedure. Iterating over the collection will allow you to determine the parameter name, data type, direction, etc.
Take a look at the SqlParameterCollection and SqlParameter class definitions for more information.