title: Passing Arrays to a Stored Procedure
body: <p>What is the best, most preferable (and, if possible, efficient) way to pass an array of strings from a .NET application to a SQL Server 2005 stored procedure?</p>
  
  <p>1) Pass the array of strings as a comma- or semicolon-delimited string and parse it into a temporary table?</p>
  
  <p>2) Pass the array as XML and use SQL Server 2005 methods to parse it into a temporary table?</p>
  
  <p>3) Write an ancilliary stored procedure to deal with each string individually and having .NET calling it for every element in the array?</p>
  
  <p>4) Other... What?</p>
  
  <p>I would say solution 2) is the most elegant one, but it is certainly not the most efficient... Is it?</p>