You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by ABOU LINA <am...@gmail.com> on 2006/03/30 20:35:04 UTC

OJB DB2 UDB, retrieving DATE ????

Hi;

AS400 as server.
DB2 UDB as database .

in a table we have a record whith the date "2999-12-31".
when using ojb to retreive this record, the value of date is returned null.

with an sql tool we have be able to get this date with the instruction
select char(datetoshow, "ISO")...
we have also verify that ojb generate select datetoshow without char(...,
"ISO").

best regards,

Re: OJB DB2 UDB, retrieving DATE ????

Posted by Vasily Ivanov <ba...@gmail.com>.
Hi,

Try this:

ReportQueryByCriteria query =
QueryFactory.newReportQuery(YourClass.class, criteria);
query.setAttributes(new String[] { "char(dateField, 'ISO')", "anotherField" });
yourPersistenceManager.getBroker().getReportQueryIteratorByQuery(query);

I didn't test, but it should work.

On 3/31/06, ABOU LINA <am...@gmail.com> wrote:
> Hi;
>
> AS400 as server.
> DB2 UDB as database .
>
> in a table we have a record whith the date "2999-12-31".
> when using ojb to retreive this record, the value of date is returned null.
>
> with an sql tool we have be able to get this date with the instruction
> select char(datetoshow, "ISO")...
> we have also verify that ojb generate select datetoshow without char(...,
> "ISO").
>
> best regards,
>
>

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