Mid
ADO.NET
ADO.NET
Execute the stored procedure using ExecuteNonQuery(), ExecuteReader(), or?
ExecuteScalar() depending on the type of result.
Example:
SqlCommand command = new SqlCommand("GetCustomerDetails",
connection);
command.CommandType = CommandType.StoredProcedure;
command.Parameters.AddWithValue("@CustomerID", customerId);
SqlDataReader reader = command.ExecuteReader();Share this Q&A
Share preview image: https://www.toolliyo.com/images/toolliyo-logo.png