There is no error in Village but in your code.
The  DB does return correct values. You tried to convert a decimal value 
to a String and then back to a BigDecimal.

Solution 1: 
Try to get a BigDecimal from the Village record.
Code example:
Record record; 
...
BigDecimal bd = record.getValue(1).asBigDecimal();

Solution 2:
Try to use a java.text.NumberFormatter to retrieve the BigDecimal value.
Here's a code example:
String numberStr = "0,50";
NumberFormatter nf = NumberFormatter.getInstance(Locale.FRANCE);
Number number = nf.parse(strVal);
BigDecimal bd;
if (number instanceof BigDecimal) {
  bd = (BigDecimal) number;
} else {
  bd = new BigDecimal(number.doubleValue());
}


deuka Deutsche Tiernahrung GmbH & Co. KG
Tel.: 0211 / 3034 - 
Fax: 0211 / 3034 - 376
eMail: [EMAIL PROTECTED]
WebSite: www.deuka.de

Reply via email to