Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dataset xml schema loses decimal acurracy
Message
General information
Forum:
ASP.NET
Category:
XML
Miscellaneous
Thread ID:
00709995
Message ID:
00710113
Views:
15
This sucks. Look like I will have to detect if the field 'hoursworked' is in the XML, then use STRTRAN to stuff in the extra info into the XML.

Thanks for your help and patience.

>When you WriteXml from a DataSet, the number is already formatted with the decimal inside of the number. The DataSet doesn't support writing out this information to the schema file. I wouldn't be surprised to see change in the future.
>
>>Quite shocking.
>>
>>How do you pass numbers with a decimal portion?
>>
>>>From what I can tell, these attributes are not supported in .NET.
>>>
>>>>I create a dataset from XML with one of the fields defined as below in the schema.
>>>>
>>>>
>>>><xsd:element name="hoursworked">
>>>>   <xsd:simpleType>
>>>>	<xsd:restriction base="xsd:decimal">
>>>>		<xsd:totalDigits value="5"/>
>>>>		<xsd:fractionDigits value="2"/>
>>>>	</xsd:restriction>
>>>>   </xsd:simpleType>
>>>></xsd:element>
>>>>
>>>>
>>>>When I WriteXML back to XML I loose the totaldigits and fractiondigits as seen below.
>>>>
>>>>
>>>><xs:element name="hoursworked">
>>>>       <xs:simpleType>
>>>>           <xs:restriction base="xs:decimal" />
>>>>       </xs:simpleType>
>>>></xs:element>
>>>>
>>>>
>>>>Anyone know how to prevent this?
Previous
Reply
Map
View

Click here to load this message in the networking platform