title: How to pass table value parameters to stored procedure from .net code
body: <p>I have a SQL Server 2005 database. In a few procedures I have table parameters that I pass to a stored proc as an <code>nvarchar</code> (separated by commas) and internally divide into single values. I add it to the SQL command parameters list like this:</p>
  
  <pre><code>cmd.Parameters.Add("@Logins", SqlDbType.NVarchar).Value = "jim18,jenny1975,cosmo";
  </code></pre>
  
  <p>I have to migrate the database to SQL Server 2008. I know that there are table value parameters, and I know how to use them in stored procedures. But I don't know how to pass one to the parameters list in an SQL command.</p>
  
  <p>Does anyone know correct syntax of the <code>Parameters.Add</code> procedure? Or is there another way to pass this parameter?</p>