• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to shift to different databases using java

 
sreenivas jeenor
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Earlier my condition was to read from single database.for that purpose i have a written a properties file.my dbconnection class used to read this properties file and create a new connection object.

Now my requirement is that based upon the login,i have to shift to respective databases.how can i do it.plz help me out.....
 
Sri Ram
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey based upon login read from different properties file. or in same property file keep entries like DB1, DB2 etc. or with some relevent names.
Read the whole property file and based on login which u might have in session, create connection to corresponding database.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic