Re: DB2JDBCException - An undefined Column name was detected!!!
Wednesday, August 11, 2004 02:15 AM
See this by a Richard D. Dettinger, I got this off midrange.com ---
"You can't qualify column names. Sorry its just not allowed. The
specification states that if a column name exists multiple times in a
ResultSet that the column name applies to the first entry.
You could write your SQL statement to give the columns unique names.
That's the only work around available.
BTW: Your app will perform better if you use the column indexes instead of
the column names. Part of why using names instead of column indexes is so
expensive is because you have to do a linear search of the names of the
columns in the ResultSet for just this reason. If your ResultSet has 100
rows and you are fetching the 100th row with a column name, you could be
spending an order of magnitude more time in the driver figuring out what
the column index is over actually doing the work of getting the data.
Sorry, dude... I'm a JDBC driver writer... I have to say those types of
things to the application programmers. :-)"