Loading ...
Sorry, an error occurred while loading the content.

3045Re: [xml-dbms] about BigDecimal

Expand Messages
  • liang.yan@neusoft.com
    Aug 5, 2003
      I use xmldbms version 2.0 alpha which is downloaded from cvs.
      when transferring data from database from XML,BigDecimal is converted to Long or Double.
      and there is a error in converted to Long. and I add one condition:
      org.xmlmiddleware.conversions.ConverBigDecimal line133
      there is two condition before and i add b.subtract(new BigDecimal(b.longValue() )).doubleValue() !=0) :

      if((b.compareTo(MAX_LONG) == 1) || (b.compareTo(MIN_LONG) == -1)||b.subtract(new BigDecimal(b.longValue() )).doubleValue() !=0)

      so it works well.

      ----- Original Message -----
      From: "Ronald Bourret" <rpbourret@...>
      To: <xml-dbms@yahoogroups.com>
      Sent: Tuesday, August 05, 2003 2:26 PM
      Subject: Re: [xml-dbms] about BigDecimal

      > Can you explain this more?
      > If I remember correctly, conversions are done in three places:
      > o When transferring data from XML to the database, XML-DBMS converts
      > from String to the column's data type.
      > o When transferring data from the database to XML, XML-DBMS converts
      > from the column's data type to String.
      > o When setting parameters, XML-DBMS converts from the data type of the
      > input object to the column's data type.
      > What am I missing?
      > -- Ron
      > liang.yan@... wrote:
      > >
      > > in xmldbms, BigDecimal is convert to long or double or integer. Data will be truncated, why not support BigDecimal to String?

      [Non-text portions of this message have been removed]
    • Show all 4 messages in this topic