suppose I've a preparedstatement that looks like this:
select name from personeltable where id=? and age<?
then I've
int idvalue=123
int agevalue=20
I'll then use setInt(1, idvalue) and setInt(2, agevalue)
my question is how to modify it such that it will work even if the preparedstatment is
select name from personeltable where age<? and id=?
ie how to know the parameterindex for id and age?
is there an existing api or do i need to write another method?
select name from personeltable where id=? and age<?
then I've
int idvalue=123
int agevalue=20
I'll then use setInt(1, idvalue) and setInt(2, agevalue)
my question is how to modify it such that it will work even if the preparedstatment is
select name from personeltable where age<? and id=?
ie how to know the parameterindex for id and age?
is there an existing api or do i need to write another method?