db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xavier Maysonnave <xav...@omondo.com>
Subject Village
Date Mon, 22 Mar 2004 10:30:09 GMT
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


Mime
View raw message