I am making a project and in this project my requirement is that I fill quantity in one dynamic table and using same quantity in other dynamic table. When I fill quantity in second table then how minus last table quantity automatic by coding in java or jsp.
Why are you posting subject as JSP and in JSP forum..
The first thing which comes to mind is UI components/rendering table in jsp page.
This is plain database/jdbc issue. Move it to that forum.
What is the issue?. anyways when you insert into database you have all values, whats the problem in calculating while inserting.
Simply write a static method in another util class which provides you desired value and use that while inserting other object.
Anyways you can't insert into more than one table at one point of time, So you have to fire two queries. So use values in first for calculations and getting value for secodn query.
It can also be done on pure database side by writing triggers. But it will be more complex as plain java/jdbc.
Sourabh
SCJP SCWCD AIX SOA AWS GA
The significant problems we face cannot be solved by the same level of thinking that created them -- Albert Einstein
and POOF! You're gone! But look, this tiny ad is still here: