Yes, numbering of both query params and the database columns in a ResultSet, starts with 1. So, others indexes will also change to 2 and 3 (instead 1 and 2). The explanation implies that other than the incorrect indexing issue there is no other issue with the given code. It has now been made clear.
thank you for your feedback!
If you like our products and services, please help us by posting your review here.
I agree that parameter index should start at 1 otherwise there will be a runtime error but what about the second line 5? My compiler complains about java.sql.Types.String ...