SqlConnection connection=new SqlConnection("connectionString"); connection.Open(); SqlCommand cmd = new SqlCommand("StoredProcedureName", connection); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add(new SqlParameter("@param1", 16)); cmd.Parameters.Add(new SqlParameter("@ID", 341)); cmd.Parameters.Add(new SqlParameter("@LOCATION", "Bank Street")); cmd.Parameters.Add(new SqlParameter("@NAME", "Prince")); DataTable dt = new DataTable(); new SqlDataAdapter(cmd).Fill(dt); connection.close();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)