How do I call a SQL stored procedure?
You can call stored procedures in basically the same manner as executing other SQL commands.
When creating the SqlCommand, set the query string to be the name of the stored procedure, and then set the CommandType to be CommandType.StoredProcedure.
After you setup the command type, you need to pass in any parameters required for the stored procedure. Here is an example of one input and one output parameter.
If the stored procedure is returning a selection query at the end, you can fill your DataSet and retrieve any tables.
Or, if no tables are being returned, you can execute the command as a non-query