Home > Net >  How to convert the datatable to XML string and then as an XML parameter to a stored procedure
How to convert the datatable to XML string and then as an XML parameter to a stored procedure

Time:10-18

As shown in the title, according to the online datatable turned into XML format string
 
Dim sb As New StringBuilder
Dim wirter As XmlWriter=XmlWriter. Create (sb)
Dim serializer As XmlSerializer=New XmlSerializer feederTable. GetType ()
Serializer. Serialize (wirter, feederTable)
Return sb. ToString

But if the stored procedure parameter types in XML, directly inside the webservice error
XML analysis: line 1, the character of 39, unable to switch code

If the change of the stored procedure parameter types to varchar, is an error in the stored procedure
Does not support from the current code switch to specify code

To do this?
  • Related