forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carlos Chávez <ccha...@agssa.net>
Subject set JdbcTypes for only one column
Date Wed, 06 Apr 2005 17:11:19 GMT

 Hi to all.

 is posible to set the jdbcTypes for only one column of the result of the
 query ?

 I know we can use the methode setJdbcTypes, but this need set the
 datatypes for all columns, i want to do this for only two columns,
 is this posible?.

 I try to do this:

 SELECT INVOICE_NUM, null AS USER1, null AS USER2 FROM INVOICE

 The problem is when the OJB try to convert the value for a
 java datatype, i think.

 the error are:

 Exception in thread "main" java.lang.NullPointerException
	at
org.apache.ojb.broker.metadata.JdbcTypesHelper.getObjectFromColumn(Unknown
Source)
	at
org.apache.ojb.broker.metadata.JdbcTypesHelper.getObjectFromColumn(Unknown
Source)
	at
org.apache.ojb.broker.accesslayer.ReportQueryRsIterator.getObjectFromResultSet(Unknown
Source)
	at org.apache.ojb.broker.accesslayer.RsIterator.next(Unknown Source)
	at
org.apache.commons.collections.IteratorUtils.toList(IteratorUtils.java:829)
	at
org.apache.commons.collections.IteratorUtils.toList(IteratorUtils.java:805)
	at
net.agssa.sga.forms.informes.InformesVentas.getListFacturasEmitidasInforme(InformesVentas.java:186)
	at ojb.ProductosFacturados.test(ProductosFacturados.java:20)
	at test.Test.main(Test.java:17)




 Cheers,

-- 
Carlos Chávez

Mime
View raw message