ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Williams" <Eric.Willi...@active.com>
Subject RE: Columns missing/duplicated in result set
Date Wed, 08 Mar 2006 19:14:54 GMT
OK, mea culpa. I had a custom type handler that was calling
ResultGetter.wasNull() before actually getting the value. Changing this
seems to have fixed the problem.

It still doesn't explain why debug output always duplicates columns of
the type in question. That doesn't seem to hurt anything though.

-----Original Message-----
From: Eric Williams [mailto:Eric.Williams@active.com] 
Sent: Wednesday, March 08, 2006 10:36 AM
To: user-java@ibatis.apache.org
Subject: RE: Columns missing/duplicated in result set

OK, I have tried this with straight JDBC code -- no problems whatsoever.
All the data is there. The null columns are null, and the columns with
data in them are populated.

When this same query is run though iBATIS, the columns that come after
those with null values also get populated with nulls.

Any ideas?

Thanks,
Eric

-----Original Message-----
From: larry.meadors@gmail.com [mailto:larry.meadors@gmail.com] On Behalf
Of Larry Meadors
Sent: Monday, March 06, 2006 7:02 PM
To: user-java@ibatis.apache.org
Subject: Re: Columns missing/duplicated in result set

I have used the JSQLConnect drivers, and had no problems at all with SQL
2000.

http://www.jnetdirect.com/products.php?op=jsqlconnect

You may want to try the DataDirect or even the M$ drivers, too.

Larry


On 3/6/06, Eric Williams <Eric.Williams@active.com> wrote:
> I haven't tried straight JDBC yet, but I have tried different JDBC
> drivers (Opta2000 and JTDS).
>
> -----Original Message-----
> From: larry.meadors@gmail.com [mailto:larry.meadors@gmail.com] On
Behalf
> Of Larry Meadors
> Sent: Monday, March 06, 2006 4:18 PM
> To: user-java@ibatis.apache.org
> Subject: Re: Columns missing/duplicated in result set
>
> I am willing to bet money it's a driver issue.
>
> Have you tried the call with straight jdbc and seeing what you get?
>
> Larry
>
>
> On 3/6/06, Eric Williams <Eric.Williams@active.com> wrote:
> > OK, it looks like this has become a real problem for us. We're
> > encountering some situations where NULL values are returned and it
> > causes the next column down the line to appear NULL as well. Can
this
> be
> > fixed?
> >
> > -----Original Message-----
> > From: Eric Williams [mailto:Eric.Williams@active.com]
> > Sent: Monday, March 06, 2006 2:26 PM
> > To: user-java@ibatis.apache.org
> > Subject: RE: Columns missing/duplicated in result set
> >
> > Thanks. I forgot to mention that I've tried this with 2 different
JDBC
> > drivers.
> >
> > Actually, I think I may have just fixed this by moving some columns
> onto
> > the end of the result set. I've noticed a problem before where if a
> > column returns null, iBATIS will cause the column after it to be
null,
> > too. Apparently it was having a different impact here.
> >
> > -----Original Message-----
> > From: Adediran.Ayandele@Sun.COM [mailto:Adediran.Ayandele@Sun.COM]
> > Sent: Monday, March 06, 2006 2:10 PM
> > To: user-java@ibatis.apache.org
> > Subject: Re: Columns missing/duplicated in result set
> >
> > Hi Eric, I had what appears to be the same problem like this using
the
> > wrong jdbc drivers. I was using drivers for Oracle 9+ while the db
was
> > Oracle 7. I thought my sqlmap or result map was to blame but it was
> > jdbc. Anyway, I'd look there first.
> >
> > Diran
> >
> > Eric Williams wrote:
> >
> > > Hi all,
> > >
> > > I have a stored proc in SQL Server 2000 that only ever returns one
> > > row. I've tried using the select and procedure statements, with
and
> > > without result maps, but I'm getting duplicate and missing columns
> no
> > > matter what I do.
> > >
> > > If I execute the stored procedure against my DB, I'll get back
rows
> > > like "A, B, C, D, E, F". iBATIS always returns "A, A, B, B, D".
> > >
> > > It's always been doubling up columns on me for some reason, but
now
> > > columns are starting to disappear. This only happened after I
> changed
> > > the data-type of a column (this is one of the columns not showing
> up,
> > > but other unchanged columns have disappeared, too).
> > >
> > > My XML looks like this:
> > >
> > > <parameterMap id="productGetParameterMap" class="map">
> > >
> > > <parameter property="id" jdbcType="GUID" javaType="java.util.UUID"
> > > mode="IN"/>
> > >
> > > </parameterMap>
> > >
> > > <procedure id="productGet"
> > >
> > > parameterMap="productGetParameterMap"
> > >
> > > resultClass="com.test.Product">
> > >
> > > {call productGet ?}
> > >
> > > </procedure>
> > >
> > > I've gone as far as using an explicit result map with column index
> > > values, to no avail.
> > >
> > > Any help would be much appreciated!
> > >
> > > Thanks,
> > >
> > > Eric
> > >
> >
> >
> >
>
>



Mime
View raw message