Java in the Database, what is my connection?

From: Prof. Ambrosius <prof_ambrosius_at_yahoo.de>
Date: 23 Oct 2001 05:24:09 -0700
Message-ID: <9463374e.0110230424.6f80cdb_at_posting.google.com>


If I run Java in the database using the
DriverManager.defaultConnection()-method, I want to know which database I am connected to. But the output of connection.getMetaData().getURL() just says jdbc:oracle:kprb: !! How can I retrieve the other information like host, sid and portnumber ??

By the side: Can I get multiple connections? Every time i call DriverManager.defaultConnection() a new Connection-object is created, but it seems to be always the *same* logical connection.

P.A. Received on Tue Oct 23 2001 - 14:24:09 CEST

Original text of this message