ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Maves <Nathan.Ma...@Sun.COM>
Subject Re: CLOBs with Oracle 9i
Date Thu, 28 Apr 2005 15:50:03 GMT
Francisco,

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.

Nathan

On Apr 28, 2005, at 9:26 AM, Francisco Leon wrote:

>
>> As Richard has already said, the 10g drivers should
>> work.  If that is not possible or practical in your
>> environment, however, there is a way to create a
>> TypeHandler implementation that handles Oracle clobs
>> using the 9i thin driver and which doesn't suffer from
>> the 4000 character limit issue.  The caveat is that
>> you need to be using iBatis in conjunction with the
>> Spring framework and also need to be running the
>> queries inside transactions (which is simple if you're
>> using Spring anyway).
>
> I am using the ojdbc14.jar but connecting with a 
> "jdbc:oracle:thin...." url
> because i was told that connecting this way doesn't require any 
> additional
> oracle software.
> I have a table with an attribute that uses a CLOB. I need to be able to
> insert it (i am using transactions there), query it, search it, etc.
> Using spring is really not an option.
>
> The application already runs fine on postgresql. The oracle 9i docs say
> varchar2 is limited to 4000 bytes, it doesn't say anything about a jdbc
> bug (ok, i don't think they would say it's a bug anyway)
>
> If i can get the same functionality with just replacing ojdbc14.jar 
> with
> the oracle 10g version i guess that's my answer, i will try it.
>
> If there's any other info you need to help me please let me know.
> Thanks
>


Mime
View raw message