S
SJ
Hi,
This problem has only just started occuring, in code that had not changed!
I have a bit field in the database, and am using SQLXML to retrieve data and
fill a strongly typed dataset. The (auto-generated) XDR for the dataset
includes this mapping to the bit field:
<xs:element name="blnAreUrlsRelative" type="xs:boolean" minOccurs="0" />
When I run this, though, I get the following error:
System.FormatException: String was not recognized as a valid Boolean. at
System.Boolean.Parse(String value) at
System.String.System.IConvertible.ToBoolean(IFormatProvider provider) at
System.Convert.ToBoolean(Object value) at
System.Data.Common.BooleanStorage.Set(Int32 record, Object value) at
System.Data.DataColumn.set_Item(Int32 record, Boolean fConvertNull, Object
value)Couldn't store <1> in blnAreUrlsRelative Column. Expected type is
Boolean.
The bit field is not nullable. The SP returns XML using the FOR XML AUTO
clause. I've checked the XML and it looks fine.
Does anyone have any ideas what could be the problem?
Thanks
Simon
This problem has only just started occuring, in code that had not changed!
I have a bit field in the database, and am using SQLXML to retrieve data and
fill a strongly typed dataset. The (auto-generated) XDR for the dataset
includes this mapping to the bit field:
<xs:element name="blnAreUrlsRelative" type="xs:boolean" minOccurs="0" />
When I run this, though, I get the following error:
System.FormatException: String was not recognized as a valid Boolean. at
System.Boolean.Parse(String value) at
System.String.System.IConvertible.ToBoolean(IFormatProvider provider) at
System.Convert.ToBoolean(Object value) at
System.Data.Common.BooleanStorage.Set(Int32 record, Object value) at
System.Data.DataColumn.set_Item(Int32 record, Boolean fConvertNull, Object
value)Couldn't store <1> in blnAreUrlsRelative Column. Expected type is
Boolean.
The bit field is not nullable. The SP returns XML using the FOR XML AUTO
clause. I've checked the XML and it looks fine.
Does anyone have any ideas what could be the problem?
Thanks
Simon