Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can this XML be used inside stored procedure?
Message
From
23/01/2010 06:42:55
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01445606
Message ID:
01445614
Views:
32
Maybe you can let SQLServer do it for you. See the latter part of this link for a (VB) example:
http://www.informit.com/articles/article.aspx?p=101369&seqNum=5

>I want to see if I can build an UPDATE command from the DiffGram XML in a stored procedure.
>
>>
>>Why do you want to do that ?
>>
>>>
>>><?xml version="1.0"?>
>>><diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" 
>>>xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
>>>  <CustomerDataSet>
>>>    <Customers diffgr:id="Customers1" msdata:rowOrder="0" diffgr:hasChanges="modified">
>>>      <CustomerID>ALFKI</CustomerID>
>>>      <CompanyName>New Company</CompanyName>
>>>    </Customers>
>>>    <Customers diffgr:id="Customers2" msdata:rowOrder="1" diffgram:hasErrors="true">
>>>      <CustomerID>ANATR</CustomerID>
>>>      <CompanyName>Ana Trujillo Emparedados y helados</CompanyName>
>>>    </Customers>
>>>    <Customers diffgr:id="Customers3" msdata:rowOrder="2">
>>>      <CustomerID>ANTON</CustomerID>
>>>      <CompanyName>Antonio Moreno Taquera</CompanyName>
>>>    </Customers>
>>>    <Customers diffgr:id="Customers4" msdata:rowOrder="3">
>>>      <CustomerID>AROUT</CustomerID>
>>>      <CompanyName>Around the Horn</CompanyName>
>>>    </Customers>
>>>  </CustomerDataSet>
>>>  <diffgr:before>
>>>    <Customers diffgr:id="Customers1" msdata:rowOrder="0">
>>>      <CustomerID>ALFKI</CustomerID>
>>>      <CompanyName>Alfreds Futterkiste</CompanyName>
>>>    </Customers>
>>>  </diffgr:before>
>>>  <diffgr:errors>
>>>    <Customers diffgr:id="Customers2" diffgr:Error="An optimistic concurrency violation has occurred for this row."/>
>>>  </diffgr:errors>
>>></diffgr:diffgram>
>>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform