db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Göschl,Siegfried" <Siegfried.Goes...@drei.com>
Subject RE: Village
Date Mon, 22 Mar 2004 10:57:36 GMT
Hi Xavier,

don't know who is maintaining Village but your patch breaks existing code

A US localization might send '50,000' which is in the US locale fiftythousand without trailing
zeros. You would correct it "50.000", i.e fifty ... :-)

Thanks in advance

Siegfried Goeschl

-----Original Message-----
From: Xavier Maysonnave [mailto:xavier@omondo.com]
Sent: Monday, March 22, 2004 11:30 AM
To: Apache Torque Developers List
Subject: Village


Hi All,

is there someone who maintain the village distribution ?

While working on data export I've got some problems and fixed two issues.

For example :

1 -

In Value.java while exporting a database with a decimal column I got a value like '0,50'.
As you can notice the database send me a localized decimal value (I am working on a french

  windows) with a ',' rather a value like '0.50'.

As a consequence the instruction :

	valueObject = new BigDecimal (number);

crashed.

I just modified the code with the following :

	number = number.replace(',', '.'); //EclipseDatabase added
	valueObject = new BigDecimal (number);

2 -

Concerning blob retrieval, here is the following :

       	case Types.BLOB:
         	Blob blob = rs.getBlob(columnNumber);
                 valueObject = blob.getBytes(1, (int) blob.length());
                 break;

If the retrieved blob is null, it causes an exception. This could be fixed with the 
following :

	case Types.BLOB:
	       Blob blob = rs.getBlob(columnNumber);
	       if (blob != null) {
			valueObject = blob.getBytes(1, (int) blob.length());
	       } else {
	        	valueObject = null;
	       }
	       break;

Regards.

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message