How do you get the results of a stored procedure in WebMatrix? db.Execute is only giving me the int result code, and db.Query doesn’t find the column name in the results.
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.
The Database helper uses the default CommandType, which is CommandType.Text. There is no way to change that to CommandType.StoredProcedure, so you need to use the following syntax:
The target audience for WebMatrix are not assumed to know about stored procedures. But you can always use plain ADO.NET and populate a strongly typed object via a SqlDataReader. Or the Entity Framework….