I used SQL Server 2005 for my small web application. I Want pass parameters to SP . But there is one condition. number of parameter that can be change time to time. Think ,this
Preparing and exctracting tags from XML is aperformance killer. The inconsistant execution timings depends on whether plan is cached or not.
Using NVARCHAR(MAX) instead is a better option. Just prepare you parameter strings with "@name=Value" pair, and add a unique parameter sepearetor if needed. Inside the procedure use SUBSTRING, CHARINDEX, etc. to get individual parameters.