permaculture playing cards
The moose likes Java in General and the fly likes Runtime db Oracle - SqlServer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Runtime db Oracle - SqlServer" Watch "Runtime db Oracle - SqlServer" New topic

Runtime db Oracle - SqlServer

aakash bhatt
Ranch Hand

Joined: Jan 09, 2003
Posts: 182
How in Java I can know at the run time which db i am using.
I do not have congiguration files/ table which says whicg db i am connected to.
My req is for a particular form if the db is Oracle I had to do certain functionality or if it is SQL Server another functionality
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

try the DatabaseMetaData class. It has methods such as getDatabaseProductName() and getDriverName() that might be useful.
[ July 07, 2003: Message edited by: Jamie Robertson ]
I agree. Here's the link:
subject: Runtime db Oracle - SqlServer
It's not a secret anymore!