ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francisco Leon <fle...@cantv.net>
Subject Re: CLOBs with Oracle 9i
Date Thu, 28 Apr 2005 16:11:04 GMT
> I think you are correct.  The maximum sixe for a varchar2 is 4000 
> characters.  If you need something bigger then that I would look into 
> using a CLOB, which has a max of 4GB.
> I have not tested it but I believe that you can you the built in CTH in 
> iBatis with a CLOB.  Just make sure that your Java type is a String and 
> you specify the jdbcType as a CLOB.

That's what i said on my first message :)
Here's the complete story.
I have a table on postgresql that uses an unlimited lenght data type
called "text". When porting my app to oracle, i saw the data type "LONG"
and used it. LONG works, but i can't use it in a WHERE statement, so it
basically sucks. So i tried a test table with CLOB and i can use it in a WHERE
just fine.

To my surprise, i was seeing that my java objects were always null because
sqlmaps couldn't handle it. This is on oracle9i. So first thing i find is that
this is a sqlmap issue, then i see that it should work on the latest version
but only if i am using oracle 10g, then in this thread someone says that
it should work with the jdbc driver for oracle 10g, which is the thing i
will try this afternoon.

If that doesn't work, along with the suggestion to use a parameter in my
jdbc url, i guess i will try your suggestion, which i think it means to use
a resultmap/parametermap specifying all jdbc types on the table and
remember to specify CLOB in the appropiate one.

Thanks for all your replies

View raw message