Passing a variables number of parameters to a SP

Passing a variables number of parameters to a SP

Post by Domini » Sat, 22 Feb 2003 01:28:10



Hi

Is it possible to pass a variable number of parameters to a stored
proceedure, in an array fro instance.

I have a list of items of which a user can check the ones they want, I'd
like to pass these directly to the
stored proceedure instead of looping through the list and passing them
individually.

Thank you for any assistance you can offer

Dom

 
 
 

Passing a variables number of parameters to a SP

Post by Anith Se » Sat, 22 Feb 2003 07:46:25


You can use optional parameters with DEFAULT values. If you want
to pass in the values as a CSV or a delimited string you can check
the archives for a lot of parsing ideas. Also there are many other
tricks like using OPENXML, Dynamic SQL etc.

--
- Anith
(Please respond only to newsgroups)