F
Fergal Ó Ceallaigh
Hello,
I have a dataset with one table which has a single row. I need to save this
to disk as XML and do this successfully throughout my application. However,
one column in this table is a datatype Array which I use to store a bunch of
information.
I will simplify the code here:
*************
MyNewRow.Item(0) = "foo"
MyNewRow.Item(1) = OtherTable.Rows(0).ItemArray
MyClass.MyDataSet.Tables(0).Rows.Add(MyNewRow)
*************
When I go to the debug window and check that the data has been accepted it
appears that it has:
========Debug Window=========
?MyClass.MyDataSet.Tables(0).Rows(0).Item(1)
{System.Array}
(0): "26B70232-BC13-4247-9580-B12271B7EADE"
(1): "7924B3A4-6E59-4E87-8217-910D77353D41"
However, when attempt to persist this dataset to XML and look inside the XML
file, the data is lost and all that is left is the text:
<SomeColumn>System.Object[]</SomeColumn>
If I reload the dataset with the saved XML instead of my array I get
========Debug Window=========
?MyClass.MyDataSet.Tables(0).Rows(0).Item(1)
"System.Object[]" {String}
String: "System.Object[]"
I am sure the answer to this must be fairly simple but I can't find it as
yet. Any help is greatly appreciated.
Thank you,
Fergal.
I have a dataset with one table which has a single row. I need to save this
to disk as XML and do this successfully throughout my application. However,
one column in this table is a datatype Array which I use to store a bunch of
information.
I will simplify the code here:
*************
MyNewRow.Item(0) = "foo"
MyNewRow.Item(1) = OtherTable.Rows(0).ItemArray
MyClass.MyDataSet.Tables(0).Rows.Add(MyNewRow)
*************
When I go to the debug window and check that the data has been accepted it
appears that it has:
========Debug Window=========
?MyClass.MyDataSet.Tables(0).Rows(0).Item(1)
{System.Array}
(0): "26B70232-BC13-4247-9580-B12271B7EADE"
(1): "7924B3A4-6E59-4E87-8217-910D77353D41"
However, when attempt to persist this dataset to XML and look inside the XML
file, the data is lost and all that is left is the text:
<SomeColumn>System.Object[]</SomeColumn>
If I reload the dataset with the saved XML instead of my array I get
========Debug Window=========
?MyClass.MyDataSet.Tables(0).Rows(0).Item(1)
"System.Object[]" {String}
String: "System.Object[]"
I am sure the answer to this must be fairly simple but I can't find it as
yet. Any help is greatly appreciated.
Thank you,
Fergal.