But as you know 0 != NULL

Thanks a lot,
Patrick
XSD
Code: Select all
<?xml version="1.0"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="shotgun">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="version">
<xs:complexType><xs:sequence>
<xs:element name="id" type="xs:integer" />
<xs:element name="frame_count" type="xs:integer" minOccurs="0" />
<xs:element name="sg_frames_aspect_ratio" type="xs:decimal" minOccurs="0" />
</xs:sequence></xs:complexType></xs:element>
</xs:choice></xs:complexType></xs:element>
</xs:schema>
Code: Select all
<?xml version="1.0"?>
<shotgun>
<version>
<id>3743</id>
<frame_count></frame_count>
<sg_frames_aspect_ratio></sg_frames_aspect_ratio>
</version>
</shotgun>
Code: Select all
System.FormatException was caught
Message=Input string was not in a correct format.
Source=mscorlib
StackTrace:
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt64(String value, NumberStyles options, NumberFormatInfo numfmt)
at System.Data.Common.Int64Storage.ConvertXmlToObject(String s)
at System.Data.XmlDataLoader.LoadColumn(DataColumn column, Object[] foundColumns)
at System.Data.XmlDataLoader.LoadTable(DataTable table, Boolean isNested)
at System.Data.XmlDataLoader.LoadData(XmlReader reader)
at System.Data.DataSet.ReadXml(XmlReader reader, Boolean denyResolving)
at System.Data.DataSet.ReadXml(String fileName)
at sg.reporting.webapp.Default.GetDs() in D:\Data\Documents\My Dropbox\Pixo_Pat\Code\user_patrickwolf\src\sg_reporting\src\sg.reporting\sg.reporting.webapp\Default.aspx.cs:line 140
at sg.reporting.webapp.Default.PreviewReport(String fpn) in D:\Data\Documents\My Dropbox\Pixo_Pat\Code\user_patrickwolf\src\sg_reporting\src\sg.reporting\sg.reporting.webapp\Default.aspx.cs:line 160
InnerException: