• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

how to update data of a field in one table from other table using jsp or java?

 
Ranch Hand
Posts: 214
Netbeans IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,

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.

please help me giving some solution............

Thanks in advanced!!!.............
 
Bartender
Posts: 4116
72
Mac TypeScript Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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


What kind of table are you talking about here (HTML, any third party library etc..)?

When I fill quantity in second table then how minus last table quantity automatic by coding in java or jsp.


What you mean by this. Where you have these table(s), in a JSP?

 
Ranch Hand
Posts: 81
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you using some custom tags like display tag etc for tables in jsp .

or

are you using javascript tables like jquery/ Yahoo UI.

It can be done easily, once you clear about how you are clearing tables.

Thanks
Sourabh
 
Rd Dari
Ranch Hand
Posts: 214
Netbeans IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi I am using these code and tablesssssss.....
and jsp page for insertion and updation these are so lenthy so







I am using these tables......








 
sourabh girdhar
Ranch Hand
Posts: 81
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
and POOF! You're gone! But look, this tiny ad is still here:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic