ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brice Ruth <bdr...@gmail.com>
Subject Re: null date object throwing errors
Date Fri, 14 Jan 2005 14:23:05 GMT
That's bizarre ... off the top of my head, you could use a <dynamic>
clause to catch if its null and try setting last_exported_date=NULL
explicitly. See if the MS SQL driver likes that any better.


On Thu, 13 Jan 2005 17:32:32 -0600, Barnett, Brian W.
<bbarnett@scholarinc.com> wrote:
> The use of this update statement throws an error when lastExportedDate is
> null. (lastExportedDate is java.util.Date) Works fine if it's not null. I
> tried using DATE instead of DATETIME, but then the time would not get
> written to the db.
> 
> <update id="updateConfig" parameterClass="config">
>  UPDATE config SET
>   last_exported_date=#lastExportedDate:DATETIME#
>  WHERE config_id = 1
> </update>
> 
> This is the error:
> com.ibatis.dao.client.DaoException: Error executing update.  Cause:
> com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred in com/scholar/model/map/ConfigSQL.xml.
> --- The error occurred while applying a parameter map.
> --- Check the updateConfig-InlineParameterMap.
> --- Check the parameter mapping for the 'lastExportedDate' property.
> --- Cause: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
> JDBC]The specified SQL type is not supported by this driver.
> 
> Any suggestions on how I can resolve this?
>

Mime
View raw message