What is Table Valued Parameters in Sql Server 2008?

SQL Server 2008 supports table-valued parameters. .

Table-valued parameters let you marshal multiple rows of data from a client application to a SQL Server in a single trip without special server-side logic to process the data. Column values in table-valued parameters can be accessed using standard T-SQL statements or using CLR routines.

You cannot pass table-valued parameters to user-defined functions. Table-valued parameters are read-only by SQL Server.

In ADO.NET, table valued parameters can be populated with DataTable, DataReader, and System.Collections.Generic.IList<SqlDataRecord> objects.

You must set the data type of the parameter to the Structured value of the SqlDbType enumeration. If you pass the table-valued parameter to a parameterized SQL statement, you need to specify the previously created type in the SQL Server through the TypeName property of the Parameter object.

No comments: