wood burning stoves
The moose likes JDBC and Relational Databases and the fly likes what to write in DriverManager.getconnection(URL) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "what to write in DriverManager.getconnection(URL)" Watch "what to write in DriverManager.getconnection(URL)" New topic

what to write in DriverManager.getconnection(URL)

jazy smith
Ranch Hand

Joined: Nov 18, 2009
Posts: 101
hi all, after going through many examples on internet, I still couldn't understand what to write in DriverManager.getconnection(URL). URL parameter refers to jdbc:subprotocol:subname kind of form. But please explain me what is subprotocol and what is subname. If I want to write a jdbc program what do I have to write as subprotocol and subname ?
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
What exactly goes there depends on what DB server you use (Oracle, Postgres, etc.), on which physical server it resides, and what the name of the database is. You can find the specifics about what to use in the documentation of the JDCB driver of whichever DB server you're using.
I agree. Here's the link: http://aspose.com/file-tools
subject: what to write in DriverManager.getconnection(URL)
It's not a secret anymore!