This project is read-only.

FireBird and Entity Framework

Coordinator
Oct 8, 2009 at 8:49 AM

In order to integrate  FireBird with  visual studio and actually with Entity Framework we need DDEX.

http://www.firebirdsql.org/firebirdtutorial/firebird-data-access-designer-ddex-installation.html

Firebird Data Access Designer (DDEX) installation

Prerequisites

  1. Make sure that you have Visual Studio .NET 2005 Standard or higher edition.
  2. Express editions are not supported.

Registry update

  1. Remember to update the path in FirebirdDDEXProviderPackageLess32.reg or FirebirdDDEXProviderPackageLess64.reg, places where to update it are marked %Path%.
  2. Install the .reg file into the registry.

Machine.config update

Add the following two sections to machine.config (located usually at C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config and C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\CONFIG\machine.config on 64-bit system).

<configuration>
  ...
  <configSections>
    ...
    <section name="firebirdsql.data.firebirdclient" type="System.Data.Common.DbProviderConfigurationHandler, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
    ...
  </configSections>
  ...
  <system.data>
    <DbProviderFactories>
      ...
      <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=%Version%, Culture=%Culture%, PublicKeyToken=%PublicKeyToken%" />
      ...
    </DbProviderFactories>
  </system.data>
  ...
</configuration>

And subst:
    %Version% With the version of the provider assembly that you have in the GAC.
    %Culture% With the culture of the provider assembly that you have in the GAC.
    %PublicKeyToken% With the PublicKeyToken of the provider assembly that you have in the GAC.

 

Coordinator
Oct 8, 2009 at 9:03 AM

Here is  more  Detail Information about DDEX for FireBird http://www.sharp-suit.com/firebird-ddex-vs2008

Firebird DDEX for VS2008

<!-- node content -->

Published November 13, 2008, 4:33 pm | by admin

How to install Firebird database engine and DDEX extension for VS2008 step by step...

1. Download proper Firebird distribution from Firebird page (download the installer as well as the embed version).

2. Install Firebird. Remember, the main user and password is sysdba/password and you can change it using gsec -user SYSDBA -password masterkey -modify sysdba -pw blahblah

3. Download and install the Firebird .NET client

4. A little tricky part here: You have to find the proper "gacutil.exe" file for your .NET distribution. The one you can find in c:\windows\microsoft.net\... ISN'T the right one, it's for .NET 1.x framework. I've found the proper one in c:\program files\Microsoft SDK's\Windows\v6.0A\Bin\x64 (Vista 64bit). So - with this gacutil do this:
gacutil.exe /l FirebirdSql.Data.FirebirdClient

You have to get something like this:
<cite>
Microsoft (R) .NET Global Assembly Cache Utility. Version 3.5.21022.8
Copyright (c) Microsoft Corporation. All rights reserved.
The Global Assembly Cache contains the following assemblies:
FirebirdSql.Data.FirebirdClient, Version=2.5.0.0, Culture=neutral, PublicKeyToken=3750abcc3150b00c, processorArchitecture=MSIL
Number of items = 1
</cite>

There are two interesting info we'll need soon: Version number and PublicKeyToken. Write it down now.

5. Download the Firebird DDEX provider and unzip the whole archive to the common accessible directory (D:\prog\firebird for me).

6. Modify machine.config file (it resides somewhere in the c:\windows\microsoft.net\framework\V2.xxx... directory - don't worry there is "v2", it's valid for .NET3.5 too). Do these changes:

  • Immediatelly BEFORE the tag </configSections> insert this line:

    <cite><section name="firebirdsql.data.firebirdclient" type="System.Data.Common.DbProviderConfigurationHandler, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /></cite>

  • Immediatelly BEFORE the tag </DbProviderFactories> insert this line:

    <cite><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.0.0, Culture=neutral, PublicKeyToken=3750abcc3150b00c" /></cite>

    (replace the PublicToken and the Version by the values from step 4) Pay attention here - the </DbProviderFactories> may be hidden on the end of the line!

Modify the 32bit version is enough, but you can modify the 64bit version of machine.config too.

7. Edit the proper XXX.reg file for your system (located in the DDEX archive (step 5) in the reg_files folder). Replace the %Path% with the path to the DDEX files (I've d:\\prog\\firebird - don't forget the double backslashes! Import this .reg file to the register (just double click on it.)

That's it! Start the Visual Studio and try to add Firebird data source.

Jul 23, 2010 at 11:29 PM

Hi,

Can you help me?  I have Visual Studio 2008 and am stuck on step #4:

4. A little tricky part here: You have to find the proper "gacutil.exe" file for your .NET distribution. The one you can find in c:\windows\microsoft.net\... ISN'T the right one, it's for .NET 1.x framework. I've found the proper one in c:\program files\Microsoft SDK's\Windows\v6.0A\Bin\x64 (Vista 64bit). So - with this gacutil do this:
gacutil.exe /l FirebirdSql.Data.FirebirdClient

You have to get something like this:
<cite>
Microsoft (R) .NET Global Assembly Cache Utility. Version 3.5.21022.8
Copyright (c) Microsoft Corporation. All rights reserved.
The Global Assembly Cache contains the following assemblies:
FirebirdSql.Data.FirebirdClient, Version=2.5.0.0, Culture=neutral, PublicKeyToken=3750abcc3150b00c, processorArchitecture=MSIL
Number of items = 1
</cite>

I'm not sure what you mean by "So - with this gacutil do this: gacutil.exe /l FirebirdSql.Data.FirebirdClient".  I found a gacutil.exe file at

c:\program files\Microsoft SDK's\Windows\v6.0A\Bin\ but I don't know how to execute the command you mention.

Thanks in advance for your help.

Gary