db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Db-derby Wiki] Update of "VersionInfo" by JohnHEmbretsen
Date Wed, 05 Sep 2007 16:29:25 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Db-derby Wiki" for change notification.

The following page has been changed by JohnHEmbretsen:
http://wiki.apache.org/db-derby/VersionInfo

------------------------------------------------------------------------------
  [/home/user/derby/lib/derbyclient.jar] 10.3.1.4 - (561794)
  ------------------------------------------------------
  }}}
- Here, the version of all the Derby jar files is '''10.3.1.4''' (SVN revision 561794).
+ Here, the version of all the Derby jar files is '''10.3.1.4''' (SVN revision 561794). Remember
that ''derby.jar'' contains the embedded JDBC driver, while ''derbyclient.jar'' contains the
client JDBC driver.
  
  If ''derbyrun.jar'' is not available, you probably have an older version of derby. Then
you must access ''sysinfo'' directly by doing for example:
  {{{
@@ -39, +39 @@

  Refer to the [http://db.apache.org/derby/manuals/index.html documentation] on Derby tools
for more information about ''sysinfo''.
  ----
  
- == Derby / database version (CLASSPATH) ==
+ == Derby driver and server version (CLASSPATH) ==
  
  '''Possible scenario:''' You don't know which version of Derby your application is using
(that is, which version of Derby is in your {{{CLASSPATH}}}). For example, you have downloaded
several products which bundle different versions of Derby and/or [http://developers.sun.com/javadb/
Java DB], and you are not quite sure which version your IDE is using.
  
  '''Possible solution:''' Use the JDBC API (!DatabaseMetaData).
  
- '''Example:''' The following Java class demonstrates how to retrieve version information
using the database metadata.
+ '''Example:''' The following Java class demonstrates how to retrieve software version information
using the database metadata.
  {{{
  #!java
  import java.sql.Connection;
@@ -82, +82 @@

  {{{
  Using Apache Derby 10.3.1.4 - (561794)
  }}}
+ '''Note:''' If you are using the client driver, the {{{DatabaseMetaData#getDatabaseProductVersion()}}}
method returns the version of the software running the database, that is the version of the
Derby Network Server (actually, the server is using the embedded driver to connect to the
database). If you want to get the version of your JDBC driver (the Derby client driver) instead,
use the {{{DatabaseMetaData#getDriverVersion()}}} method, as shown below. In an embedded scenario
the embedded driver itself runs the database, so the two methods will return the same result.
+ {{{
+ String driverVersion = dbmd.getDriverVersion();
+ }}}
  ----
  
  
- == JDBC version ==
+ == JDBC specification support ==
  
  '''Possible scenario:''' You want to use some special feature that is not available in all
versions of JDBC. You are not sure which JDBC version your Java VM supports, but want to find
out.
  
@@ -136, +140 @@

  JDBC 4
  }}}
  
- Note that Derby JDBC drivers of version 10.2.2.0 and later include (binary) support for
JDBC 4.
+ Note that Derby JDBC drivers of version 10.2.2.0 and later include support for JDBC 4.
  ----
  

Mime
View raw message