You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Eric Williams <Er...@active.com> on 2006/03/06 22:57:52 UTC
Columns missing/duplicated in result set
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
Re: Columns missing/duplicated in result set
Posted by Diran Ayandele <Ad...@Sun.COM>.
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
>