Questions tagged [table-valued-parameters]

Table-Valued Parameters is a feature introduced in SQL SERVER 2008. In earlier versions of SQL SERVER it is not possible to pass a table variable in stored procedure as a parameter, but in SQL SERVER 2008 we can use Table-Valued Parameter to send multiple rows of data to a stored procedure or a function without creating a temporary table or passing so many parameters.

Table-valued parameters are like parameter arrays in OLE DB and ODBC, but offer more flexibility and closer integration with Transact-SQL. Table-valued parameters also have the benefit of being able to participate in set-based operations

Transact-SQL passes table-valued parameters to routines by reference to avoid making a copy of the input data.

http://msdn.microsoft.com/en-us/library/bb510489.aspx

Table-valued parameters are declared by using user-defined table types. You can use table-valued parameters to send multiple rows of data to a Transact-SQL statement or a routine, such as a stored procedure or function, without creating a temporary table or many parameters. Table-valued parameters are like parameter arrays in OLE DB and ODBC, but offer more flexibility and closer integration with Transact-SQL. Table-valued parameters also have the benefit of being able to participate in set-based operations. Transact-SQL passes table-valued parameters to routines by reference to avoid making a copy of the input data. You can create and execute Transact-SQL routines with table-valued parameters, and call them from Transact-SQL code, managed and native clients in any managed language.

411 questions
-1
votes
1 answer

Dapper Table Valued Parameter OleDB returns Unspecified Error

I have read your answer regarding on the use of TVP in Dapper, I also have implemented your solution but when I execute the code, Dapper returns to me an "Unspecified Error" message. I have reviewed all of the components involved: TVP in SQL…
-1
votes
1 answer

while using table valued parameter getting scalar variable error in sp

i created table valued parameter like this: CREATE TYPE dbo.ss AS TABLE(ss1 NVARCHAR(5)); then i wrote my stored procedure like this: ALTER PROCEDURE [dbo].[T_TransactionSummary] @locations dbo.ss…
user2878851
  • 153
  • 1
  • 5
  • 17
-2
votes
1 answer

Generic class for convert list of object to IEnumerable

I've this object: public class ConsentData { public string ConsentName { get; set; } public bool ConsentValue { get; set; } public DateTime ConsentDate { get; set; } } I should pass a List of ConsentData to a stored procedure in SQL…
Luciano
  • 450
  • 1
  • 7
  • 17
-2
votes
1 answer

Why do we need table value parameter

We have access to actual table inside storedprocedures . Then what is the need to pass table through parameter? Any special advantage?
vignesh
  • 1,414
  • 5
  • 19
  • 38
-2
votes
1 answer

Table Value Parameter error when Insert

I am using following sp to insert value in 3 tables, So when my TVPCheque and TVP Cash have records then it works without any error BUT, When my Table Value Parameters are empty on following sp then error raised in c# ALTER PROCEDURE…
-2
votes
1 answer

Table-Valued Parameters not visible

For a reason unknown to me, I cannot access the contents of my TVP. The debugger says @_AccountList and @AccountTVP are tables, but I cannot view the contents, print them, nor will intellisense offer me auto completion for a column. I feel like…
user1729696
  • 311
  • 2
  • 5
  • 16
1 2 3
27
28