Originally posted by Seetesh Hindlekar:
Hi,
When used, gives Invalid Column index. Is 0 reserved for some variable?
Why only the ResultSet.getxxxx(1) has to start from column index from 1 onwards.
Seetesh
I suppose this is a "because it does, so just accept it" answer. The
JDBC API designers made a decision at some point that the column indexes would be base-1 instead of base-0 like you were expecting.
I wish all index-related methods were base-0 for consistency reasons. It is kind of annoying to have to remember which methods use 0 and which use 1. You just get used to it after a while. :roll: