db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jørgen Løland <Jorgen.Lol...@Sun.COM>
Subject Re: Using Derby with Java Web Start
Date Tue, 04 Sep 2007 07:24:44 GMT
Hi Néstor

You could check the version of the database by using a call to 
DatabaseMetaData#getDatabaseProductVersion. Something like this:

java.util.Properties props = new Properties();
props.put("user", <username>);
props.put("password", <password>);

java.sql.Connection conn = 
java.sql.DriverManager.getConnection("jdbc:derby:mydb", props);

java.sql.DatabaseMetaData metadata = conn.getMetaData();
System.out.println("Derby Version:" + metadata.getDatabaseProductVersion());


Regards,
Jørgen Løland

Néstor Boscán wrote:
> Hi Alan
> 
> Thanks for the info. Do you know how to get the version of the database?. 
> 
> Regards,
> 
> Néstor Boscán 



-- 
Jørgen Løland

Mime
View raw message