Subject RE: [Firebird-Java] DatabaseProductName
Author Jeremy Blythe
Whoops, posted too soon. Don't worry about it. It seems that Spring lets
you wildcard the DatabaseProductName so you can put 'Firebird*' in the
definition like this:

<bean id="Firebird"
<property name="databaseProductName" value="Firebird*"/>

> -----Original Message-----
> From: Jeremy Blythe
> Sent: 01 August 2006 12:46
> To:
> Subject: [Firebird-Java] DatabaseProductName
> Hello,
> I use the Spring Framework and the sql-error-codes.xml file
> to specify mappings from GDS error codes like 335544336 to
> Spring DataAccessExceptions. Spring uses the
> DatabaseProductName retrieved from a call to
> java.sql.DatabaseMetaData.getDatabaseProductName(). It then
> uses this name to find the error mapping. In Jaybird 1.5.6
> this used to work because the DatabaseProductName was
> 'Firebird' but in Jaybird 2 and above (including the new
> Beta) it returns a long string including the version number
> and the host name of the database server, therefore this
> mapping doesn't work anymore. The new DatabaseProductName
> looks like this 'Firebird 1.5)LI-V1.5.3.4870 Firebird 1.5/tcp
> (idi)/P10'. (Note that 'idi' happens to be the Firebird
> server host name that I'm connected to). Is there anyway this
> can be reverted back to just plain 'Firebird' or something
> simpler and not dependant on the deployment environment like
> the host name?
> Thanks in advance
> Jeremy.
> Yahoo! Groups Links