Views: 9.8K
Replies: 2
Archived
|
SqlMap & Xml (Spark Generator)I am trying to Generate an entity in my database that contains an Xml column. When I run the Generator I am told that the Xml object does not exist and that I may be missing a using statement.
I know that there is a System.Xml namespace but I don't know if an object of type Xml exists. Should I try and use the SqlXml type, will this work? Any suggestions? Thanks. Jonathan Pickford, Apr 19, 2014
|
|
Reply 1Jonathan:
Indeed, the solution is to map Xml to string and it will work fine. The next release of Spark code generator will replace Xml with the string data type (for those who need this now, it is the very last entry in the SqlMap). Alternatively, you could bypass Spark and optimize your CRUD with XmlSqlReader etc, but his involves extra hand-coding. For those interested here is a link: http://stackoverflow.com/questions/13690991/what-does-the-sql-server-xml-datatype-translate-to-in-net-and-how-do-i-convert Jack Poorte, Apr 22, 2014
|
|
Reply 2Managed to resolve this by updating the SqlMap in the generator to map XML to string
Jonathan Pickford, Apr 20, 2014
|