• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to get Database name from connection object

 
somenath chatterjee
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using odbc5.jar(thin driver) for create connection with oracle database.
Now i want to get database name from connection object.
like in seq-server we use - connection.getCatalog().
but in oracle its return null.
please reply me if anybody know its solution.

thank you.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can do it with DatabaseMetaData. Have a look at the methods that class gives you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic