wood burning stoves 2.0*
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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Runtime db Oracle - SqlServer" Watch "Runtime db Oracle - SqlServer" New topic
Author

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
Regards,
aakash
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.
Jamie
[ July 07, 2003: Message edited by: Jamie Robertson ]
 
 
subject: Runtime db Oracle - SqlServer