Click here to Skip to main content
15,891,766 members
Everything / TVP

TVP

TVP

Great Reads

by PIEBALDconsult
Simple demonstration of using UDTTs and TVPs to pass DataTables to SQL Server 2008

Latest Articles

by PIEBALDconsult
Simple demonstration of using UDTTs and TVPs to pass DataTables to SQL Server 2008

All Articles

Sort by Score

TVP 

25 Apr 2017 by CHill60
Works fine for me unless I forget to include the code from DECLARE @employeeInfo EmployeeInfo;If I omit that DECLARE from my selection before hitting F5 then I get the same error as you. I.e. you have to run all of the following: DECLARE @employeeInfo EmployeeInfo; DECLARE @TotalHours...
26 Nov 2010 by xbadenx
The use off TVP's has it's advantages, in terms of doing the equivalent of huge bulk-inserts to a database.A bit of background...In a scenario where you may have to insert, say 20,000 records into a database, rather than doing 20,000 individual inserts, you can pass a complex objec, a...
24 Dec 2016 by glitteringsound
Hello,I need to pass a .NET Collection to a stored procedure. My collection contains 1000 records. Each record contains 2-3 child objects of other types.All I need to insert them at once by calling stored procedure from .NET.I already have tried a TVP (table-valued parameter), but...
24 Dec 2016 by AFell2
So, what you are saying is that you have structured data that consists of parent and child records, and while the parent schema is static, the children have differing schemas.Is your intent to shred the data and span it across multiple tables in the database using a single stored procedure?...
24 Dec 2016 by #realJSOP
I've never had performance issues with sql server that were not caused by something I've done. I don't use table valued parameters.You can either iterate the list and save the onbjects one at a time, or do like the first answer suggested, and serialize all the data into xml and pass the XML...
24 Dec 2016 by glitteringsound
Previously I used entity framework for saving 100K rocords in database where each recod further contains child records.my object hierarchy is : public class Consignment{....List addresses {get; set;}List lines { get; set; }}I could expect Consignments Count = 100K...
24 Dec 2016 by AFell2
There is another option you might want to consider, and that is adding and populating your referential integrity fields (Id, ParentId, etc.) in your POCO (or a new POCO just for the insertion process) and then performing set-based inserts for each object type. You would use the "SelectMany" LINQ...
24 Dec 2016 by glitteringsound
How would sql server knows which child belongs to which parent?
25 Apr 2017 by wichaelmilson
Hi, Im currently having an issue when executing with @employeeinfo at the last execute statement. Is this a declaration issue or string issue? how can i fix? Im trying to pass through a stored procedure that generates a payroll for an employee. @employeeinfo should be passing through a TVP but...
14 Jul 2010 by PIEBALDconsult
Simple demonstration of using UDTTs and TVPs to pass DataTables to SQL Server 2008