|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Friday, June 07, 2013 1:23 PM
Points: 64,
Visits: 182
|
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Thursday, September 20, 2012 1:32 PM
Points: 15,
Visits: 53
|
|
Nice summary. Probably the biggest disappointment with TVPs is how promising they are in concept but how limiting they are in practice. Its unfortunate that one needs to define a .NET data table by hand, to exactly match a TVP, instead of being able to just define a datatable as being of type of the TVP itself.
Its also a tremendous disappointment that Entity Framework does not support TVPs (even in .NET 4).
SQL Server developments often seem so disjointed. What I was really was hoping to see released was something more "object oriented" - to use that abused phrase - something like (a) to be able to define a table "type" (or "class" or "template" or whatever you want to call it), and (b) be able to create a table as of that type, and (c) be able to create a TVP as of that type, and (d) to be able to create an ADO data table as of that type, etc.
(Heck - make "MERGE" know about templates so that when its input is a table and a correspondlingly matched TVP, then it would automatically know how to do its field by field upsert ..)
Anyhow, one abstraction for a "data template definition" and many concrete implementation of that template. And EF supported ! Wouldn't that be nice?
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Friday, July 31, 2009 11:03 AM
Points: 10,
Visits: 36
|
|
| Thanks for theses articles. I can't wait to start using TVP. I will see an immediate change in my web app structure. I already have found myself using strongly typed datatables more often for complex transactions despite the extra work. Now being able to insert in bulk instead of looping rows is a significant improvement. Enough so, that some of the refactoring I have been planning on doing has more value. I would love to read your enhancement summary on time zones. This also has some serious potential for considering app structure changes. Thanks again!
|
|
|
|
|
SSChampion
        
Group: General Forum Members
Last Login: Today @ 8:25 AM
Points: 10,613,
Visits: 11,955
|
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Thursday, February 14, 2013 1:05 PM
Points: 103,
Visits: 133
|
|
hi arshad,
I would appreciate if you can put down a piece of code to how it was implemented in SQL Server 2005 ...It can be either using Temp tables or many parameter. A simple example is needed.
Thanks, D
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Wednesday, December 08, 2010 7:23 AM
Points: 17,
Visits: 41
|
|
In SQL 2005 you can use XML data Type to pass structured data to stored procedure, instead of TVP.
|
|
|
|
|
SSCoach
         
Group: General Forum Members
Last Login: Today @ 8:39 AM
Points: 18,856,
Visits: 12,440
|
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Thursday, September 27, 2012 1:23 AM
Points: 9,
Visits: 160
|
|
| I agree, XML is nice. I use XML in similar cases.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Monday, April 19, 2010 6:04 AM
Points: 9,
Visits: 42
|
|
We are using TVP's in a call to a stored procedure. The proc takes three arguments of which all are TVP's. This functionality does not seem to scale at all, no matter how many threads are calling the stored procedure, it always performs the same. We removed all functionality in the proc but this made almost no difference. It seems that the major time is spent in the passing of the TVP's from the .net dataaccess code to the stored procedure. Could there be that there are some locks involved? Is the TVP's not recommended if you call the stored proc at a high frequency? Do we have to send batches instead to achieve any performance?
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Friday, June 24, 2011 3:32 AM
Points: 3,
Visits: 27
|
|
really gr8 ariticle  but one thing I'd like to say order of columns must match in Table Type(DB) and Passing Table(.NET). is there any solution for this. plz shere it.
Thanks,
|
|
|
|