ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ed Griebel" <edgrie...@gmail.com>
Subject Re: please, help with booleans
Date Wed, 28 Jun 2006 17:46:19 GMT
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, Esperanza.Echeverria@steria.es
<Esperanza.Echeverria@steria.es> 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" <edgriebel@gmail.com>
>
> 27/06/2006 15:37
> Please respond to user-java
>
>
>         To:        user-java@ibatis.apache.org
>
>         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: Esperanza.Echeverria@steria.es <Esperanza.Echeverria@steria.es>
>  Date: Jun 27, 2006 3:32 AM
>  Subject: please, help with booleans
>  To: user-java@ibatis.apache.org
>
>
>  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.
>
>

Mime
View raw message