Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

database url  RSS feed

 
Amanda Weber
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do I get the url of my database, to get a driverManager?
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Usually it depends on the DBMS you are using. And also on the JDBC Driver you are using to connect with.
Your JDBC Driver documentation should give you the URL to use. Here are a couple of examples:
MySQL with Connector/J
URL=jdbc:mysql://hostname : port/database
JDBC-ODBC
URL=jdbc : odbc : Databasename
Is this the info you were looking for?
The spacing above is to kill the smilies.
[ January 23, 2003: Message edited by: Gregg Bolinger ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!