File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes DSN problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "DSN problem" Watch "DSN problem" New topic

DSN problem

Ransika deSilva
Ranch Hand

Joined: Feb 18, 2003
Posts: 524
I just wanted to know this.
I connect to MS ACCESS data bases using the normail
So on
The question I have is say now I can write a sql statement like this
" SELECT something FROM some Table WHERE (SELECT someotherthing FROM someothertable like that ".
Now when you create a Connection You only have DSN for one database only. Can I do this in java... if can how can I have multiple dsn to different databases

SCJP 1.4, SCMAD 1.0<br />SCWCD, SCBCD (in progress)
Ron Newman
Ranch Hand

Joined: Jun 06, 2002
Posts: 1056
You can load as many JDBC drivers as you want, and create as many Connections as you want referring to each one of them.

Ron Newman - SCJP 1.2 (100%, 7 August 2002)
Ransika deSilva
Ranch Hand

Joined: Feb 18, 2003
Posts: 524
You mean can I have like this....
Connection checkicode_con =
DriverManager.getConnection"jdbc dbc:checkicode.icode,namecode"," ","");
checkicode, icode , namecode are dsn for different table
jQuery in Action, 3rd edition
subject: DSN problem
It's not a secret anymore!