Batched Update in .NET 2.0

  • Thread starter Thread starter Sahil Malik
  • Start date Start date
S

Sahil Malik

Would you say that in Yukon/.NET 2.0, it would be better to pass in the
entire dataset changes in all of the related parent-child tables - as a
dataset - into the Yukon CLR? That way you could have the cake and eat it
too viz, have a complex relation-ed dataset and yet be able to acheive the
update in one shot to the Yukon Sql Server.

Which brings up another question - why do people not use too much of that
approach by sending updategrams into Sql 2000 using SqlXml?

Of the above two approaches, which one would you recommend, and why?

- Sahil Malik
You can reach me thru my blog -
http://www.dotnetjunkies.com/weblog/sahilmalik
 
Here are my 2 cents:
1. Updating Dataset using SQLCLR
a. If the Dataset(DS) is large (in order of MB) you dont want to send
the whole DS on wire.
b.You wan to use SqlServer Managed Provider to update the data if you
need more performance, else there are no real benefits.
c. Since Adapter logic is not current supported in the SqlServer MP, you
would have code your own adapter logic
d. How do you pass the DS as a paremeter to the UDF(User Defined
Functions) - by XmlSerialization (bad perf for huge DS), by
BinarySerialization(only with 2.0)

2. Batch Updates ( new in ADO.Net 2.0) - similar to updategrams
a. There is way to send batch updates to server in ADO.Net 2.0(using
SqlDataAdapter.UpdateBatchSize property)
b. Good for huge DS.
 
Back
Top