--- In IB-Java@egroups.com, "J.T. Wenting" <jwenting@h...> wrote:
<snip>
> When doing the following:
> select count(*) as userCount from users
> and then rs.getInt("userCount");
> I get an error that column userCount does not exist, again only
through
> JDBC.
>
> Are these known problems with 1.6?
Jeroen,
yes, apparently this is an InterClient bug. Currently only the
original column names can be used to reference a column by name - the
"as" labels don't work.
Unfortunately the InterClient buglist isn't available for us yet, so
I don't know if this is a known bug. Maybe Shaunak Mistry can help us
out again - Shaunak, are you there ;-)
I checked the InterClient2.0 sources and the bug isn't fixed there
as well, so I guess it is not listed yet.
The fix is totaly simple, the list of column labels is already there,
so we merely have to check it:
ResultSet.java, method public int findColumn(String columnName):
Replace line 1812
"if (resultColumnNames_[col].equalsIgnoreCase(columnName)) {"
with
"if ( resultColumnNames_[col].equalsIgnoreCase(columnName) ||
resultColumnLabels_[col].equalsIgnoreCase(columnName)) {"
DISCLAIMER: If you do it, you do it on your own risk!
I still did not find the time to configure the CVS stuff (god help me
on this one! lol), so currently I don't have the chance to put the
fix into the "original" code. I'll post it to IB-Commits and ask...
Torsten
P.S. I finished to rework the IC1.6 sources to eliminate the loads of
deprecation warnings. The changes apply to IC2.0 as well.
Since I/we don't have test cases yet, it will take me more time to
test everything properly before I "release" it.