Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DSN problem

 
Ransika deSilva
Ranch Hand
Posts: 524
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Heloo,
I just wanted to know this.
I connect to MS ACCESS data bases using the normail
Class.forName(.....)
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
thanks
 
Ron Newman
Ranch Hand
Posts: 1056
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can load as many JDBC drivers as you want, and create as many Connections as you want referring to each one of them.
 
Ransika deSilva
Ranch Hand
Posts: 524
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic