Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jdbc connection url

 
varkala prabhakar
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
In DriverManager.getConnection, we have three parameters..for URL,Login, Passwd.
Some time back, when i was using Oracle on 202.141.81.233 IP, the parameter is
jdbc racle:thin:@202.141.81.233:1521 ROJDB,"scott","tiger";

But now i am working with MS Access, and database is in computer name "cebgt068".
can any one tell me what should be the URL part to get the connection with the database.
thank you
prabhakar.
 
Debbie Argulkar
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
You need the DSN. If you are using JDBC DBC as I do with MS access, you can do the following:
Your connection String will be "jdbc dbc: (write DSN name here)"
connection = DriverManager.getConnection(ConnectString,username, password);
Hope this helps,
-Deb
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic