0

see my query is like this
(select studentname from student where studentid='+studentid+')

then i display in jsp like this
st_16 //studentid
.nikki //student names
.nani //student names
now second time when i add select student id st_17
now jsp i have display like
st_16
.nikki
.nani //first id's name + second id name's
st_17
.kutti
.abhi

if i add third id
i have to get all 3 id's with its corresponding name's

can anyone tell me how to write code
in while (rs.next())

2
Contributors
2
Replies
3
Views
10 Years
Discussion Span
Last Post by aruna_k_2006
0

//after you execute the query

while (rs.next()){
System.out.println(rs.getString("studentid"));
System.out.println(rs.getString("studentname"));
}

--------------------------------------------------------
I hope this is what you meant in your message.

if not just tell me and i will try to think of something else.

Cao

0

//after you execute the query

while (rs.next()){
System.out.println(rs.getString("studentid"));
System.out.println(rs.getString("studentname"));
}

--------------------------------------------------------
I hope this is what you meant in your message.

if not just tell me and i will try to think of something else.

Cao

no ,
actually i am starting with jsp file i have a text box where i give student id like st_16 ok then it goes to servlet & bean & come to a next jsp file

next time in text box i give st_17 id now i have get
st_16
.nikki
.nani
st_17
.kutti
.chinnu
ok

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.