This exception ocures when you do not add specified paramater , but in this case you have added the specified parameter, So the other issue may be, the value you r passing to the store procedure is null, But in you stored procedure you havent defined that as nullable.
So check the name value at run time (param2.Value = name) whether it is not null.
If it is null you have to made the changes to the stored procedure as it accepts nullable
create PROCEDURE [dbo].[GetCustomerByName]
@ipv_CustomerName varchar(20) = NULL
as
select * from Customers
where CustomerName = @ipv_CustomerName
Let me know if its solve your issue,
Best Regards