S
Sarath
Hi,
I have a doubt.
Is there a way that allows me to get all the values of a column from a
java.sql.ResultSet in an array .
I can loop on the resultset and add each of the values to an array.
But is there method to do this by default i.e., a method from
java.sql.ResultSet ???
right now what i m doing is
rs i my ResultSet containing the output of the query.
i =0;
int arr[] = new int [];
while(rs.next()){
int val = rs.getInt(1);
arr = val;
i++;
}
I checked in javadoc but i didnt find one.
what i want is a method that will return me the array if i pass a
resultset and columnIndex to it.
Thank you,
Sarath.B
I have a doubt.
Is there a way that allows me to get all the values of a column from a
java.sql.ResultSet in an array .
I can loop on the resultset and add each of the values to an array.
But is there method to do this by default i.e., a method from
java.sql.ResultSet ???
right now what i m doing is
rs i my ResultSet containing the output of the query.
i =0;
int arr[] = new int [];
while(rs.next()){
int val = rs.getInt(1);
arr = val;
i++;
}
I checked in javadoc but i didnt find one.
what i want is a method that will return me the array if i pass a
resultset and columnIndex to it.
Thank you,
Sarath.B