Link to home
Start Free TrialLog in
Avatar of patelsuni
patelsuni

asked on

How can I insert the multiple values for a single column within a loop in JSP?

When I click on submit button, I need to insert the multiple rows. I tried to put the insert statement within While loop like WHile rs.next(){
}

But rs is not as resultset. It stores the resuklts return by the query using getQueryResults. How can I iterate through the entire set of values and insert them.

I'll really appreciate if anyone can help me in this.

Thanks
Nimisha
Avatar of cheekycj
cheekycj
Flag of United States of America image

I am not sure I follow the flow.

Can u outline what you are trying to do.

You should be able to loop through a collection and run sql updates using jdbc.

CJ
Avatar of Mick Barry
bit hard to help without seeing your code.
post your code and we'll help fix it.
Avatar of patelsuni
patelsuni

ASKER

Thanks for getting back to me.
Actually I was able top make it work. I put the Insert statement in a While loop ,thereby I was able to store a multiple values for a sinlge column.
Thanks for getting back to me.
Actually I was able top make it work. I put the Insert statement in a While loop ,thereby I was able to store a multiple values for a sinlge column.
ok.  Please ask Community Support to either PAQ this question or delete it.

CJ
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

- To be PAQed and points NOT refunded.

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

girionis
EE Cleanup Volunteer
ASKER CERTIFIED SOLUTION
Avatar of modulo
modulo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sorry for the late comment, but the user solved their own problem, shouldn't pts be refunded?

CJ
Thnx for clarifying.

CJ