ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yusuf" <Yu...@ekalife.co.id>
Subject RE: Invalid Column Type issue in confluence
Date Mon, 24 Apr 2006 01:10:56 GMT
actually i've been having this problem for quite some time, but i will
try to reproduce and post it here again 
just to make sure its not other column.

thanks :)
Yusuf.

-----Original Message-----
From: Nathan Maves [mailto:Nathan.Maves@Sun.COM]
Sent: Friday, April 21, 2006 10:24 PM
To: user-java@ibatis.apache.org
Subject: Re: Invalid Column Type issue in confluence


The first option should work fine.  Are you positive that it is not  
one of your other columns causing the issue?

Nathan

On Apr 20, 2006, at 7:21 PM, Yusuf wrote:

> Hi,
> In the faq page about null value inserts in here:
> http://opensource.atlassian.com/confluence/oss/display/IBATIS/What 
> +cause
> s+an+Invalid+column+type+error+with+Oracle
> said that you can do something like this and you can prevent the
> misleading error 'Invalid Column Type' if the value in line2 and
> sold_date is null :
>
> <insert id="insertAddress" parameterClass="Address">
>         INSERT INTO
>             ADDRESS (
> 		line1,
> 		line2,
> 		city,
> 		state,
> 		postal_code,
> 		purchase_date,
> 		sold_date	
>                 )
>             values (
>                 	#line1#,
> 		#line2:VARCHAR#,
> 		#city#,
> 		#state#,
> 		#postal_code#,
> 		#purchase_date#,
> 		#sold_date:DATE#	
>             )
> </insert>
>
> But this solution never works for me (or maybe for oracle..),  
> instead i
> always have to do something like :
>
> <insert id="insertAddress" parameterClass="Address">
>         INSERT INTO
>             ADDRESS (
> 		line1,
> 		line2,
> 		city,
> 		state,
> 		postal_code,
> 		purchase_date,
> 		sold_date	
>                 )
>             values (
>                 #line1#,
> 		<isNull property="line2">
> 			null,
> 		</isNull>
> 		<isNotNull property="line2">
> 			#line2#,
> 		</isNotNull>
> 		#city#,
> 		#state#,
> 		#postal_code#,
> 		#purchase_date#,
> 		#sold_date#	
>             )
> </insert>
>
> I was wondering if someone actually having the same problem with me,
> currently i'm using
> - iBATIS 2.1.5 build 582
> - oracle 8.1.7
> - oracle10g jdbc thin driver (ojdbc14.jar)
> - c3p0 0.9.0.2
>
> Thanks :)
> Yusuf.
>



Mime
View raw message