wood burning stoves 2.0*
The moose likes JDBC and the fly likes jdbc connection url Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "jdbc connection url" Watch "jdbc connection url" New topic
Author

jdbc connection url

varkala prabhakar
Ranch Hand

Joined: Sep 08, 2001
Posts: 54
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

Joined: Jul 26, 2002
Posts: 43
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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: jdbc connection url