File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes External Database Connection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "External Database Connection" Watch "External Database Connection" New topic
Author

External Database Connection

deepa karra
Ranch Hand

Joined: Apr 04, 2008
Posts: 46
Hi,
I have to display columns from two tables using HibernateDAO. The information to connect to the second table is stored in the first table. How can I use the host,username and password stored in one table to connect to another table and display columns from both the tables in one page?
Tudor Raneti
Ranch Hand

Joined: Nov 29, 2009
Posts: 145
You can start with http://docs.jboss.org/hibernate/core/3.3/reference/en/html/session-configuration.html#configuration-programmatic
Then follow thid CRUD tutorial: http://facestutorials.icefaces.org/tutorial/hibernate-tutorial.html
skipping the irrelevant xml configurations
deepa karra
Ranch Hand

Joined: Apr 04, 2008
Posts: 46
Thankyou!!
deepa karra
Ranch Hand

Joined: Apr 04, 2008
Posts: 46
Dear Tudor Raneti,
I am able to connect to different databases making two different connections. But i am unable to save the data into a table when both the connections are open.
Deepa
 
Consider Paul's rocket mass heater.
 
subject: External Database Connection
 
Similar Threads
Joining 3 Tables
Complex SQL Query
List Sorting
jdbc + swing
JTable usage