aspose file tools*
The moose likes JDBC 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
Bookmark "what to write in DriverManager.getconnection(URL)" Watch "what to write in DriverManager.getconnection(URL)" New topic
Author

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
Marshal

Joined: Mar 22, 2005
Posts: 42631
    
  65
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.


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: what to write in DriverManager.getconnection(URL)