ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoff Chiang <geoffchi...@yahoo.com>
Subject Re: CLOBs with Oracle 9i
Date Thu, 28 Apr 2005 04:46:13 GMT
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).

Let us know if this fits your situation.

Geoff

--- Richard Yee <ryee@cruzio.com> wrote:
> Francisco,
> You can use the 9i OCI drivers to get around the
> 4000-char limit. I'd 
> suggest just downloading the 10g drivers. They
> should work with 9i.
> 
> 
> 
> -Richard
> 
> At 05:30 PM 4/27/2005, you wrote:
> >Hello, i am having some trouble with oracle9i in
> sqlmaps.
> >I was using LONG for  a table attribute, but it
> doesn't support
> >being used in WHERE, so i changed it to a CLOB and
> now sqlmaps
> >can't handle it therefore the attribute is always
> null.
> >
> >I have read that the latest sqlmaps has a clob
> handler, but it only
> >works on oracle 10g, so i need to write my own.
> >
> >Your wiki has an example on
> http://wiki.apache.org/ibatis/
>
>How_do_I_use_a_Custom_Type_Handler_with_a_BLOB_or_CLOB.
> >
> >The problem is that i am doing an application that
> has support
> >for different sql databases (oracle and postgresql)
> so i can't
> >change or add a POJO as you guys call it just for
> oracle since
> >i would have to handle when to use it, so i need
> the solution
> >to be either in the database or in the sqlmaps' xml
> file.
> >
> >To represent the data of a CLOB your example uses a
> byte[].
> >Is it possible to use it with a String so i
> wouldn't have to
> >change my object?
> >
> >I would like to know what my alternatives are. So
> far i have
> >to use a varchar2 which is limited to only 4000
> bytes.
> >
> >Postgresql has a data type called "text" which has
> unlimited
> >length and works perfectly as a string in sqlmaps.
> >
> >Any help is greatly appreciated.
> >Francisco
> 
> 
> 

Find local movie times and trailers on Yahoo! Movies.
http://au.movies.yahoo.com

Mime
View raw message