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 value of Date property can not be passed to Stored Procedure
Date Thu, 20 Jan 2005 15:11:58 GMT
Have you tried using TIMESTAMP? This was suggested in a previous
thread concerning MS SQL Server and Date fields.


On Thu, 20 Jan 2005 00:29:44 -0000, bittergeek <bittergeek@lycos.co.uk> wrote:
>  
> Hi, 
>   
> I'm using MS SQL Server. 
>   
> 1. I have a javabean with Date properties. When those properties have null
> values, I will get java exceptions by calling stored procedure using them as
> parameters (I have to use stored procedure, otherwise I can use ISNOTNULL to
> avoid passing null values to database). I tried parameterClass and
> parameterMap (Date vs. DATETIME), both failed. 
>   
> Do I have to set Date property to some value before passing it to JDBC
> dirver? If so, what value should I set? 
>   
> 2. parameter element of parameterMap has NULLVALUE and NULL properties. If I
> set the NULLVALUE of a Date property to "000-00-00 00:00:00.000", can this
> be mapped to a DATETIME column? 
>   
> Thank you very much! 
>   
> bqiao

Mime
View raw message