ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sundar Sankar" <fatboys...@gmail.com>
Subject Re: Passing an object to Stored procedure.
Date Tue, 15 Jul 2008 23:33:34 GMT
Hi Larry,
           Can you give me an example.

I tried using a typehandler for the same and it didnt work. I am new into
the world of stored procedures and dont know if I did something wrong there.

The code I did in the setParameter() of the Typehandler was

StructDescriptor aaStructuredDescriptor =
StructDescriptor.createDescriptor("oracleType",conn);

                Object [] attributes = {value1, value2, value3};
                parameter = new STRUCT(aaStructuredDescriptor ,
underLyingConnection, attributes);
setter.setObject(parameter);

I get a java.sql.SQLException: Invalid column type

-S


On Tue, Jul 15, 2008 at 2:50 PM, Larry Meadors <larry.meadors@gmail.com>
wrote:

> I've not tried this...but you may be able to do it with an anonymous
> pl/sql block.
>
> Larry
>
>
> On Tue, Jul 15, 2008 at 3:37 PM, Sundar Sankar <fatboysuns@gmail.com>
> wrote:
> > Hi,
> >      I have a stored procedure that takes an in parameter of an Oracle
> > object (varchar col1, varchar col2, float col3). How do I call such a
> stored
> > proc from Ibatis.
> >
> >
> > Any help is appreciated.
> >
> > Thanks
> > Sundar
> >
>

Mime
View raw message