How to save a Xml-File on SQL-Server


Author
Message
Rainer Kempf, RK
Rainer Kempf, RK
StrataFrame Novice (95 reputation)StrataFrame Novice (95 reputation)StrataFrame Novice (95 reputation)StrataFrame Novice (95 reputation)StrataFrame Novice (95 reputation)StrataFrame Novice (95 reputation)StrataFrame Novice (95 reputation)StrataFrame Novice (95 reputation)StrataFrame Novice (95 reputation)
Group: StrataFrame Users
Posts: 55, Visits: 1.4K
Hi,



I have follwing probelm.



I have a table on sqlserver with a field of type XML



in BO i changed Datatype of this field to System.Data.SqlTypes.SqlXml



this is code for saveing XML on SQL-Server :







If File.Exists(LcFileName) Then



Dim loXMLDocument As XmlDocument = New XmlDocument

loXMLdocument.Load(LcFileName)

loXML = New SqlXml(New XmlTextReader(loXMLdocument.InnerXml, XmlNodeType.Document, Nothing))



GridConfigBo1.layoutxml = loXML



GridConfigBo1.Save()





End If







When Record not exist on SQL-Server then Record will be saved.



Next time when i try to update XML-Field i got error message. (Translated error message)



The XML Datatyp can be only compared or sorted with the is null operator.





what did i wrong ???



Thanks



Rainer

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search