On 04/13/10 09:50 PM, Eranda Sooriyabandara wrote: > Hi, > Are there any method which we can get the current database instance name?
EmbedConnection has a public method called getDBName(), but that method can only be used if you cast the connection instance to EmbedConnection, and it only works on the embedded driver. If you want to get the database name through the JDBC interfaces, I think you first need to get the connection URL, String url = conn.getMetaData().getURL(); and then extract the database name part from the string. -- Knut Anders
