J
jamie
I have built an XML file using the DataSet.writeXML method and it creates
this schema
<?xml version="1.0" standalone="yes"?>
<LengthConversion>
<xs:schema id="LengthConversion" xmlns=""
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="LengthConversion" msdata:IsDataSet="true">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="lengthConversion">
<xs:complexType>
<xs:sequence>
<xs:element name="METERS" type="xs:double" minOccurs="0" />
<xs:element name="FEET1" type="xs:int" minOccurs="0" />
<xs:element name="percentage1" type="xs:int" minOccurs="0"
/>
<xs:element name="feet2" type="xs:int" minOccurs="0" />
<xs:element name="percentage2" type="xs:int" minOccurs="0"
/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<lengthConversion>
Now the issue I have is getting the Double into a sqlce database. Double
isn't a valid datatype for sqlce. The original field type is float, I'm
not sure why it's becoming a double in the XML
My question is how to best correct this issue.
Can I specify that it's a float or a string in the XML generated
automatically?
Any other suggestions on how to handle this?
Changing the original database type to be something else isn't an option.
Jamie
this schema
<?xml version="1.0" standalone="yes"?>
<LengthConversion>
<xs:schema id="LengthConversion" xmlns=""
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="LengthConversion" msdata:IsDataSet="true">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="lengthConversion">
<xs:complexType>
<xs:sequence>
<xs:element name="METERS" type="xs:double" minOccurs="0" />
<xs:element name="FEET1" type="xs:int" minOccurs="0" />
<xs:element name="percentage1" type="xs:int" minOccurs="0"
/>
<xs:element name="feet2" type="xs:int" minOccurs="0" />
<xs:element name="percentage2" type="xs:int" minOccurs="0"
/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<lengthConversion>
Now the issue I have is getting the Double into a sqlce database. Double
isn't a valid datatype for sqlce. The original field type is float, I'm
not sure why it's becoming a double in the XML
My question is how to best correct this issue.
Can I specify that it's a float or a string in the XML generated
automatically?
Any other suggestions on how to handle this?
Changing the original database type to be something else isn't an option.
Jamie