Hi All
I am a novice, just trying out
I am trying to read all the values of the table to an array
I am using the code
" Statement stat = (Statement) conn.createStatement();
String SQLstring = "select * from students ";
ResultSet rs = (ResultSet) stat.executeQuery(SQLstring);
List lsm = new ArrayList();
while (rs.next()) {
lsm.add(rs.getString(1));
This way, I get only the first field value in my ArrayList "lsm", how could
I add the other values such as rs.getString(2), rs.getString(3) to my
arrayList 'lsm
Guidance requested
Thanks
Joseph John
--
You received this message because you are subscribed to the Google Groups
"JPassion.com: Web Programming Basics" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/jpassion_web/-/ogpZp_p3rVoJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/jpassion_web?hl=en.