File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes how to update data of a field in one table from other table using jsp or java? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "how to update data of a field in one table from other table using jsp or java?" Watch "how to update data of a field in one table from other table using jsp or java?" New topic
Author

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

Rd Dari
Ranch Hand

Joined: Feb 22, 2010
Posts: 206

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!!!.............
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3817

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?


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
sourabh girdhar
Ranch Hand

Joined: Feb 10, 2010
Posts: 71

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


SCJP SCWCD AIX SOA
The significant problems we face cannot be solved by the same level of thinking that created them -- Albert Einstein

Rd Dari
Ranch Hand

Joined: Feb 22, 2010
Posts: 206

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

Joined: Feb 10, 2010
Posts: 71

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to update data of a field in one table from other table using jsp or java?
 
Similar Threads
'dynamic' SQL query and 'dynamic' java beans ?
How to implement GROUP BY in CMP???
how to maintain a table field's value from second table'value
jboss not able to read .war file
What are advantages of applets?