File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes How to insert data into multiple tables? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "How to insert data into multiple tables?" Watch "How to insert data into multiple tables?" New topic
Author

How to insert data into multiple tables?

prasant sahoo
Greenhorn

Joined: Dec 14, 2007
Posts: 7
I am new to MySql & Struts.My recent project needs data to be inserted into multiple tables...please help me....
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30146
    
150

Prasant,
Welcome to JavaRanch!

In order to insert data into multiple tables, you need to write multiple statements which each insert data to one table. Check for dependencies between the tables so the lower level tables get loaded first.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
prasant sahoo
Greenhorn

Joined: Dec 14, 2007
Posts: 7
Thanks Jeanne.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: How to insert data into multiple tables?
 
Similar Threads
Sub-header in datatable column
sqlException column not found
hybernate doubt
how to Join Multiple tables
TableColumnModelListener Questions