Share via


MapN19_4ToCurrency Property

Specifies whether to map the XML type xsd:decimal to the Visual FoxPro Currency data type when the XML facets totalDigits and fractionDigits are 19 and 4 respectively. You can set the MapN19_4ToCurrency property to preserve precision. Read/write.

MapN_4ToCurrency applies only when executing the LoadXML and Attach methods, which retrieve XML consistent with its setting.

XMLAdapter.MapN19_4ToCurrency [= lValue]

Return Value

  • lValue
    Logical data type. The following table lists the values for lValue.

    lValue Description

    False (.F.)

    Does not map xsd:decimal to Currency. (Default)

    True (.T.)

    Map xsd:decimal to Currency. The XML facets totalDigits and fractionDigits must be 19 and 4 respectively.

Remarks

Applies To: XMLAdapter Class

By default, Visual FoxPro maps xsd:decimal to Numeric. However, you can retain currency type precision by mapping xsd:decimal to Currency instead of Numeric. For example, SQL Server currency fields are represented in XML as decimal 19,4 with 19 total digits and 4 digits following the decimal point.

For more information about Visual FoxPro and XSD data type mapping, see Visual FoxPro and XML Schema Data Type Mapping.

Example

The following example shows how the XML schema type simpleType, as defined, is mapped to Currency in Visual FoxPro:

<xsd:simpleType>
   <xsd:restriction base="xsd:decimal">
   <xsd:totalDigits value="19"/>
   <xsd:fractionDigits value="4"/>
   </xsd:restriction>
   </xsd:simpleType>

See Also

Reference

XMLAdapter Object Properties, Methods, and Events
Currency Data Type
Numeric Data Type
LoadXML Method
Attach Method (Visual FoxPro)

Other Resources

Properties (Visual FoxPro)