Link to home
Start Free TrialLog in
Avatar of gswitz
gswitz

asked on

The dataset is created with a DOUBLE datatype instead of a DECIMAL datatype for the numeric column.

da.FillSchema(ds,SchemaType.Source);
            ds.WriteXmlSchema(AppDomain.CurrentDomain.BaseDirectory + @"\ds_1.txt");

Returns this...

<?xml version="1.0" standalone="yes"?>
<xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
  <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="Table">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="A" type="xs:double" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
  </xs:element>
</xs:schema>

I understand I need to change it from xs:double to Decimal type before filling the dataset in order to get accurate data.

Can someone tell me how to do that?
ASKER CERTIFIED SOLUTION
Avatar of joriszwaenepoel
joriszwaenepoel
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gswitz
gswitz

ASKER

Haha! You JUST beat me. I was coming to post the same and you already had!! Thanks for your help!!