M Mervin Sep 8, 2009 #1 Can anyone provide sample code for simply inserting the xml from an XDocument into a XML column in SQL Server? Thanks in advance.
Can anyone provide sample code for simply inserting the xml from an XDocument into a XML column in SQL Server? Thanks in advance.
M Mervin Sep 8, 2009 #2 I discovered the answer. If using a SqlDataSource on a FormView, within the ..aspx page change the Parameter type from Object to String. Then, set the value of the XML column to the string of the XDocument value: XDocument responseXML = XDocument.Load(tr); e.Values["Response_Xml"] = responseXML.ToString(); Mervin
I discovered the answer. If using a SqlDataSource on a FormView, within the ..aspx page change the Parameter type from Object to String. Then, set the value of the XML column to the string of the XDocument value: XDocument responseXML = XDocument.Load(tr); e.Values["Response_Xml"] = responseXML.ToString(); Mervin