XML column


Author
Message
Keith Chisarik
Keith Chisarik
StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
Any examples or documentation of accessing the XML data in an XML column via BO field property? 

Keith Chisarik
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Hi Keith. Sorry if I this is not what you are looking for, but here are some explanation and code sample on how to read XML file into a BO:

http://forum.strataframe.net/FindPost681.aspx

Cheers.

Keith Chisarik
Keith Chisarik
StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
Thanks but that is not what I am looking for. I am looking for sample code or documentation on the SF support for XML type fields. XML fields are typed as XmlReader on the business object and I am having a hard time accessing the data in them where I have no trouble using vanilla ADO.

Keith Chisarik
Keith Chisarik
Keith Chisarik
StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
Lots of issues with this mainly due to not finding much in the way of documentation for this column type (if it exists I cant find it). There are no XML fields in Strataflix sample.

I am able to add and save a row in a BO that contains an XML column, but I cannot access it (string conversion error) without going down to the underlying datatable, I also cannot save an update to the field as I get "The XML data type cannot be compared or sorted, except when using the IS NULL operator."

Anyone have an experience using XML columns with SF that cant point me in the right direction or provide some support on this would be appreciated. 

Keith Chisarik

Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.4K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Keith, is this on SQL Server 2005?
Keith Chisarik
Keith Chisarik
StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
SQL 2008 - I just hit the same exact issue with the same field as a SQL_VARIANT, Strataframe types the field as XmlReader and I dont know how to interact with it (and cant find much in the way of documentation).

I went the variant route because of the issue I had with the XML field type Sad

I am doing this because I need to store user defined data.

Keith Chisarik

Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.4K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Keith, I'll check on this with Trent and the development team regarding this and also regarding support for the other new data types (date, time, hierarchal ID, etc).
Peter Jones
Peter Jones
Advanced StrataFrame User (506 reputation)Advanced StrataFrame User (506 reputation)Advanced StrataFrame User (506 reputation)Advanced StrataFrame User (506 reputation)Advanced StrataFrame User (506 reputation)Advanced StrataFrame User (506 reputation)Advanced StrataFrame User (506 reputation)Advanced StrataFrame User (506 reputation)Advanced StrataFrame User (506 reputation)
Group: Forum Members
Posts: 386, Visits: 2.1K
Hi Keith,



This may help.



We have a semi generic method of creating interfaces into ERP systems and gather the data into XML format and store that data in a SQL table. The table we use has column called ERXIFData and its data type is XML.



When we want to show contents of the ERXIFData we use a DevExpress grid and pass to it a dataset that has been generated from the XML data. One instance of ERXIFData could contain contain several 100 rows of data.



The code we use is:



   Case clsENU.ERPIFType.ERPBoughtIn

ShowAnInterface(Me.luERX.Properties.GetDataSourceValue("ERXIFData", Me.luERX.ItemIndex).ToString, Me.GridControl9, Me.GridView9, Me.XMLDataSetBoughtIn)







Private Sub ShowAnInterface(ByVal ERXIFData As String, _

ByRef Grid As DevExpress.XtraGrid.GridControl, _

ByRef GridView As DevExpress.XtraGrid.Views.Grid.GridView, _

ByRef ds As System.Data.DataSet)





Dim objXmlNamespaceManager As New System.Xml.XmlNamespaceManager(New System.Xml.NameTable)



Dim reader As New System.Xml.XmlTextReader(ERXIFData, _

System.Xml.XmlNodeType.Document, _

New System.Xml.XmlParserContext(Nothing, _

objXmlNamespaceManager, _

"", _

System.Xml.XmlSpace.None))

ds.ReadXml(reader)



Grid.DataSource = ds.Tables(0)



Grid.ForceInitialize()



GridView.UpdateSummary()

clsFU.LocaliseAllControls(Grid)

reader.Close()



End Sub





And that's it.



The DevExpress Grid renders the columns in the dataset automatically (refer Grid.DataSource = ds.Tables(0)), i.e. we can pass any pieces of XML to the grid (including hierarchical) and it renders correctly.



To pass in the ERXIFData column we first convert it to String.



Cheers, Peter
Keith Chisarik
Keith Chisarik
StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
Thanks for the post. So you bypass the use of a SF business object when it comes to using the XML column and just use straight ADO/.NET databinding?

Keith Chisarik
Keith Chisarik
Keith Chisarik
StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
Greg, thank you very much. I have an immediate need for this, will be anxiously awaiting an answer on the support for these field types within SF.

Keith Chisarik
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