Print Friendly and PDF
Follow

Troubleshooting: "Column 'InvariantName' is constrained to be unique. Value 'FirebirdSql.Data.FirebirdClient' is already present" error

Example of error:

OzSoft.VETtrakAPI.Database.DatabaseException: An error occurred creating the configuration section handler for system.data:
Column 'InvariantName' is constrained to be unique. Value 'FirebirdSql.Data.FirebirdClient' is already present.
(C:\inetpub\Vettrak\web.config line 222)
   at OzSoft.VETtrakAPI.Database.DbLookup._GetID(Query query)
   at OzSoft.VETtrakAPI.Database.DbLookup.GetUpgradingFlag()
   at OzSoft.VETtrakAPI.Utils.Session.IsDatabaseUpgrading()
   at OzSoft.VETtrakAPI.Functions.Validation.DB_Handshake()
   at VT_API.VT_API.DB_Handshake()

This occurs when an ADO.NET Firebird driver is already installed and configured in the machine.config. To fix, in the web.config, change the system.data element to add a "remove" element before the existing "add" element as follows:

<system.data>
  <DbProviderFactories>
    <remove invariant="FirebirdSql.Data.FirebirdClient"/>
      <add name="FirebirdClient Data Provider" invariant="FirebirdSql.Data.FirebirdClient" description=".Net Framework Data Provider for Firebird"
           type="FirebirdSql.Data.FirebirdClient.FirebirdClientFactory, FirebirdSql.Data.FirebirdClient, Version=2.5.1.0, Culture=neutral,
                 PublicKeyToken=3750abcc3150b00c"/>
  </DbProviderFactories>
</system.data>

 

Back to Top
    Tags:
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.