jQuery in Action, 2nd edition*
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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: 39547
    
  27
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 - updated with new look and Ping home screen widget
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: what to write in DriverManager.getconnection(URL)
 
Similar Threads
Setting the db var for clj-record library in a common file
The getConnection method is trying to ruin my life!
connecting Java with MS SQL2000 or 7.0
How to connect servlet to mysql database
how to connect java with oracle rdb