Greetings,
I have a datatable which contains xml data.
The LINQ code within the thread selects the datarow based on a criteria.
The problem lies no matter what I try I can never get the values as xml/string data, I often see the literal words "System.data.datarow" or simalar rather than the data.
The datatable has rows and I can print the values using a for each loop, however as using LINQ require .AsEnumberable to query the datatable.
The plan was once retrieving the XML then add it to a NEW xmldocument as an xmlElement
I've messed around between formats and even tried anonymous types but can never get the datarow values out as xml/string.
This is causing me a migraine!!
Could really do with a helping hand to query the datatable and retrieve xml output, any tips or advice?
Thanks
Rob
I have a datatable which contains xml data.
The LINQ code within the thread selects the datarow based on a criteria.
The problem lies no matter what I try I can never get the values as xml/string data, I often see the literal words "System.data.datarow" or simalar rather than the data.
The datatable has rows and I can print the values using a for each loop, however as using LINQ require .AsEnumberable to query the datatable.
The plan was once retrieving the XML then add it to a NEW xmldocument as an xmlElement
Code:
Dim outQuoteDoc As New XDocument(New XElement("quotefile", quotes)
Code:
Dim quotes = From quote In frmMainQuote.quoteData.Tables("quote").AsEnumerable _
Where quote.Item("category").ToString = cboCategory.SelectedItem.ToString _
And quote.Item("author").ToString = txtAuthor.Text _
And quote.Item("text").ToString Like "*" & txtKeyword.Text & "*" _
And quote.Item("date").ToString = dtpQuoteDate.Value.ToString("dd MMMM yyyy") _
Select quote.Tostring()
I've messed around between formats and even tried anonymous types but can never get the datarow values out as xml/string.
This is causing me a migraine!!
Could really do with a helping hand to query the datatable and retrieve xml output, any tips or advice?
Thanks
Rob