Originally posted by Naseem Khan:
PreparedStatement is useful only if your query parameters are changing.
1. Table A is a parent and all others are child records.
Said that, there can be more than 1 records for Tables b,c,d,e
Inserts will be
insert into A values();
insert into B values();//can be more depending on user selecting
insert into B values();
......
insert into C values() // can be more depending on how much user selecting
insert into C values()
.....
Quote by me:
PreparedStatement is useful only if your query parameters are changing.
Quote from stu derby:
if there's any chance at all that the statment will be resubmitted with different values, then PreparedStatement is the only way to go.
Atul Mishra wrote:All,
From the data I get from the JSP, I have to insert values into 5 different tables.
Whats the best way to do it ?
have 5 insert statements in the code or have a stored procedure in the back and call it, or ..
Please assist.
All inputs appreciated.
Thanks
what if we put solar panels on top of the semi truck trailer? That could power this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
|