ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vincent NICOLAS <vincent.nico...@teamlog.com>
Subject Re: Select timestamp from db
Date Mon, 12 Dec 2005 15:44:32 GMT
Hi,

systimestamp doesn't seem to be available under Oracle 8i (my configuration).

However, you can use :

<select id="getDbDate" resultClass="java.util.Timestamp">
    select sysdate from dual
</select>

... to get a complete timestamp.



Andre Peterka a écrit :

>Hello all
>
>I am having a problem retrieving the current timestamp from the DB (in
>this case oracle):
>
>  <select id="getDbDate" resultClass="java.sql.Timestamp">
>   select systimestamp from dual
>  </select>
>
>I get the follwing error:
>
>--- The error occurred while applying a result map.  
>--- Check the getDbDate-AutoResultMap.  
>--- Check the result mapping for the 'SYSTIMESTAMP' property.  
>--- Cause: java.sql.SQLException: Invalic columntype
>
>Whereas 
>
>  <select id="getDbDate" resultClass="java.util.Date">
>   select sysdate from dual
>  </select>
>
>Works fine.
>
>Any help is appreciated.
>
>Thanks in advance,
>Andre
>
>  
>


-- 
Vincent NICOLAS
Teamlog, Lyon


Mime
View raw message