Thursday, August 1, 2013

Insert xml data into SQL server via SqlBulkCopy with powershell (casting error)

Treating the XML like a string worked for me, eg



(New-Object System.Data.DataColumn -ArgumentList @("EventLogXML" , [System.string] ))

...


$row.Item("EventLogXML") = $xml.InnerXml


No comments:

Post a Comment