ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shilpa <shilpa.prad...@judiciary.state.nj.us>
Subject Re: QueryForObject returns wrong data
Date Tue, 26 Jul 2005 21:01:54 GMT




Nathan Maves <Nathan.Maves <at> Sun.COM> writes:

> 
> Can you send your xml code?  (ResultMap, SQLMap)
> 
> Nathan
> 
> On Jul 26, 2005, at 2:50 PM, shilpa wrote:
> 
> > Hi,
> >
> >     It may sound little strange, but I am getting wrong data back  
> > when I call
> > QueryForObject( ) method and try to get firld of Decimal data type.
> >
> > e.g
> > I am calling this method by passing financialStatus as object.
> >
> > sqlMap.queryForObject("selectFinancialInfo",finStatus);
> >
> > I am using Stored Procedures to retrieve data from DB2.
> >
> > I have a field in table 'SocialSecurity' with value 99.44
> >
> > but when I execute
> >
> > sqlMap.queryForObject("selectFinancialInfo",finStatus);
> >
> > and call finStatus.getSocialSecurity();
> > its just returning me 99 and not 99.44
> >
> > My stored procedure is not returning a ResultSet but everything in OUT
> > parameters.
> >
> > Same procedure works fine with normal JDBC code. (returns 99.44)
> >
> > Can you please guide me, where I am doing wrong.
> >
> > Thanks,
> > shilpa


This is a parameter map.

<parameter property="financialSocialsecurity" jdbcType="DECIMAL" 
javaType="java.math.BigDecimal" mode="OUT"/>

I do not have resultMap as my Storedprocedure is not returning ResultSet

Do you want me to send whole XML. (Actually Stored Procedure takes more than 
100 parameters, so I thought that will be unnecessary) but if you need it I can 
send.

Thanks for immediate reply.
Thanks,
Shilpa





Mime
View raw message