M
Mike Gage
I am trying to populate DataSets with results from SQL queries.
Usually, to that end, the DataSet.Fill method works fine. If however
the table includes a character field populated with a space, the
DataSet throws an exception. I assume that the restriction is because
of the DataSet's use of XML. I tried setting the XMLDataDocument's
PreserveWhiteSpace property, but to no avail.
The error message I receive is:
The DataSet Xml persistency does not support the value '0x20' as Char
value, please use Byte storage instead.
at System.Data.Common.CharStorage.Set(Int32 record, Object value)
at System.Data.DataColumn.set_Item(Int32 record, Object
value)Couldn't store < > in spec_handling Column. Expected type is
Char.
There must be a simple way to handle spaces in DataSets. Has anyone
found it?
Thanks.
-Mike Gage
Usually, to that end, the DataSet.Fill method works fine. If however
the table includes a character field populated with a space, the
DataSet throws an exception. I assume that the restriction is because
of the DataSet's use of XML. I tried setting the XMLDataDocument's
PreserveWhiteSpace property, but to no avail.
The error message I receive is:
The DataSet Xml persistency does not support the value '0x20' as Char
value, please use Byte storage instead.
at System.Data.Common.CharStorage.Set(Int32 record, Object value)
at System.Data.DataColumn.set_Item(Int32 record, Object
value)Couldn't store < > in spec_handling Column. Expected type is
Char.
There must be a simple way to handle spaces in DataSets. Has anyone
found it?
Thanks.
-Mike Gage