Apparently when using the DataSet.ReadXMLSchema, if you want a string field to have a DefaultValue of "" this is not interpreted correctly when the table is built. The DefaultValue for the field ends up being DBNull.
Here's a sample segment (which was written originally by DataSet.WriteXMLSchema):
Irritating as I will have to go change a bunch of code to cope with this! Heads up!Code:<xs:element name="Bonus" msdata:CaseSensitive="True"> <xs:complexType> <xs:sequence> <xs:element name="Name" type="xs:string" /> <xs:element name="Value" type="xs:string" default="" minOccurs="0" /> </xs:sequence> </xs:complexType> </xs:element>




Reply With Quote