On 04/14/10 22:15, Eranda Sooriyabandara wrote: > Hi Knut, > Thanks. Also is there a way to get the current database name within the > code? > The purpose is to print the current database name to the log.
Hi Eranda, It should be possible to call EmbedConnection.getDBName() from within the code as well, if a connection has been created. But exactly how to get the database name depends on where in the code you need to get it from. Is this question about DERBY-4601? If so, I guess that means you'll want to get it from InternalDriver and/or EmbedConnection. In InternalDriver, you typically have the URL and need to call the helper method getDatabaseName() to extract the name. In EmbedConnection, you can simply call getDBName() or tr.getDBName(). -- Knut Anders
