table-valued-parameters

How to pass table value parameters to stored procedure from .net code

≡放荡痞女 提交于 2019-11-25 21:59:03
问题 I have an MS SQL Server 2005 database. In a few procedures I have table parameters that I pass to a stored proc as an nvarchar (separated by commas) and internally divide into single values. I add it to the SQL command parameters list like this: cmd.Parameters.Add(\"@Logins\", SqlDbType.NVarchar).Value = \"jim18,jenny1975,cosmo\"; 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