| Author |
connecting to different libraries in db2
|
lynn ng
Greenhorn
Joined: Aug 07, 2007
Posts: 6
|
|
Hi, I need to join table in two different libraries in DB2 database. How to open connection to different libraries? I think "schemaName" is the name of the libraries, doesn't it? I would like to open another connection to another libraries. Do I have to create another connection class? String url = ""jdbc:as400://datasource//schemaName" Driver drive = DriverManager.getDriver(url); Connection con = drive.connect(url,pp); Thank you,
|
 |
Stan James
(instanceof Sidekick)
Ranch Hand
Joined: Jan 29, 2003
Posts: 8791
|
|
Yes, it's as easy as creating another connection. You can connect to several databases at once. Give it a shot and show us what you make! BTW: I'm not familiar with the term "library" in this context. Do you just mean two databases?
|
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
|
 |
Jesper de Jong
Java Cowboy
Bartender
Joined: Aug 16, 2005
Posts: 12911
|
|
"lynn ng", Please check your e-mail.
|
Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
|
 |
 |
|
|
subject: connecting to different libraries in db2
|
|
|