Webservice 返回dataset给外部调用,数据类型不精确
Webservice 返回dataset给外部调用,数据类型基本都对,但是decimal类型不对。如下:
已知:
1. MSSQL 表 A ,字段B decimal(8,2)
2. webservice取数据
sqlDataAdpter.MissingSchemaAction = MissingSchemaAction.AddWithKey; // 控制类型
sqlDataAdpter.Fill(ds,"A")
return ds;
//?? ds.Tabels[0].Rows[0]["B"].GetType() 未知,不知道怎么看精确的长度
3. Webservice 在IE里查看出的XML
<xs:element name="b" type="xs:decimal" minOccurs="0" />
4. VFP 里调用后 存入临时表
B字段的 类型 decimal(20,19)
5. 手动改XML后,VFP 临时表 里是可以显示 B字段为decimal(8,2)
<xs:element name="b" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:decimal">
<xs:totalDigits value="7" />
<xs:fractionDigits value="2" />
</xs:restriction>
</xs:simpleType>
</xs:element>
问题:
我要怎么设置C#里的的DataSet活着adpter 才能实现数据精确对接
急!!!
谢谢