Connecting to differnt database with the same code base

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ksrashmi
    New Member
    • May 2007
    • 30

    Connecting to differnt database with the same code base

    Hi

    we have 3 database . i want to connect to 3 differnt database using same code , it is web application . we are using connection pooling ,
    how can i do this ? any idea pls help me .
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by ksrashmi
    Hi

    we have 3 database . i want to connect to 3 differnt database using same code , it is web application . we are using connection pooling ,
    how can i do this ? any idea pls help me .
    Possible, just use datasources and pass different connection strings /urls for the connection.

    Comment

    • JosAH
      Recognized Expert MVP
      • Mar 2007
      • 11453

      #3
      Originally posted by r035198x
      Possible, just use datasources and pass different connection strings /urls for the connection.
      You don't even need to do that: simply register the drivers to the DriverManager
      and open the connections for the different databases.

      kind regards,

      Jos

      Comment

      Working...