If it was a new stored procedure I would just code it so that the OUT
parameter  (or the field in a record set/ref-cursor) was set to 'true'
or 'false'. For an existing stored procedure it would be a simple
matter to create a function that took a boolean and returned the
appropriate VARCHAR2, like below. It would be even easier if to_char()
or something similar took a boolean and returned a varchar directly,
thre's probably some trick out to do it.

function bool_to_char(z in boolean)
return varchar2 as
                 begin
                          if z then return 'true';
                          else return 'false';
                          end if;
                end;


-ed

On 6/28/06, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:


hello Ed, really thanks, yes, i am working with oracle...
please, can you put me an example about how you convert it to "true" or 
"false"?? or you make it in the pl-sql function??

thanks in advance...





"Ed Griebel" <[EMAIL PROTECTED]>

27/06/2006 15:37
Please respond to user-java


        To:        [email protected]

        cc:
        Subject:        Re: please, help with booleans



You do not say what database you are using, but Oracle's JDBC driver
 does not support Boolean results to be returned, it isn't a problem
 with iBatis. I have this problem and I convert them to "true" or
 "false" and return them as VARCHAR2.

 -ed

 ---------- Forwarded message ----------
 From: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
 Date: Jun 27, 2006 3:32 AM
 Subject: please, help with booleans
 To: [email protected]


 i have a procedure call that returns me a boolean and i don“t know how
 to take it with ibatis, what jdbcType i must put? and javaType??
 please, someone has an example of this?? i want to take this boolean
 value from ibatis and now i obtain an error in my parameter
 mode="out", about my type is incorrect.


Reply via email to