Subject | Re: [Firebird-Java] Detecting server version using jaybird 2.2 |
---|---|
Author | Mark Rotteveel |
Post date | 2017-07-07T11:36:54Z |
On 2017-07-07 08:54, 'Steffen Heil (Mailinglisten)'
lists@... [Firebird-Java] wrote:
org.firebirdsql.util.FirebirdSupportInfo (although the specific case
above isn't covered by an explicit method).
getDatabaseMajorVersion() and getDatabaseMinorVersion(), or
getDatabaseProductVersion() which produces a string with the full
Firebird version. For this last method you can use
GDSServerVersion.parseRawVersion(String) to parse this string to a
GDSServerVersion, which gives you limited functionality to compare
versions. There are other ways, but those are not easily accessible when
using FBWrappingDataSource.
Mark
lists@... [Firebird-Java] wrote:
> HiFor Jaybird 3 you could do some of these things using
>
>
> As we are moving from firebird 2.0 (!) to firebird 3 at the moment,
> there are a few places where we need to know which firebird server
> version we are connected to.
> (For example to use ALTER statements instead of writing to RDB tables.)
>
> How can that be done with jaybird?
org.firebirdsql.util.FirebirdSupportInfo (although the specific case
above isn't covered by an explicit method).
> Especially using 2.2, as we currently cannot move to 3.0 because weFor Jaybird 2.2, the easiest way is probably DatabaseMetaData:
> still depend on FBWrappingDataSource.
getDatabaseMajorVersion() and getDatabaseMinorVersion(), or
getDatabaseProductVersion() which produces a string with the full
Firebird version. For this last method you can use
GDSServerVersion.parseRawVersion(String) to parse this string to a
GDSServerVersion, which gives you limited functionality to compare
versions. There are other ways, but those are not easily accessible when
using FBWrappingDataSource.
Mark