RAD Studio (Common)
ContentsIndex
PreviousUpNext
Deploying the AdoDbx Client

You can deploy AdoDbx Client applications in several ways.

To deploy updating machine.config

  1. Register the following files in the Global Assembly Cache (GAC) or have them in the same directory as the project .exe:
    • Borland.Data.AdoDbxClient.dll
    • Borland.Data.DbxCommonDriver.dll
    • Borland.Data.DbxDynalinkDriver.dll
    • Borland.Data.DbxReadOnlyMetaData.dll
    • Borland.Delphi.dll
    • Borland.VclDbRtl.dll
  2. The Microsoft .NET machine.config file must have an entry added for the provider. Locate the machine.config file in the Windows\Microsoft.NET directory and add the following entry to the <DbProviderFactories> section:

<add name="AdoDbx Data Provider" 
invariant="Borland.Data.AdoDbxClient" 
description=".Net Framework Data Provider for dbExpress Drivers" 
type="Borland.Data.TAdoDbxProviderFactory, Borland.Data.AdoDbxClient, Version=11.0.5000.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b"/>

  1. The machine.config file must have an entry added for the connection string. Add an entry to the <connectionStrings> section similar to this one for an Interbase connection:

<add name="IBConnection" 
connectionString="SomeName=IBCONNECTION;
drivername=Interbase;
database=someDatabasePathName\database.gdb;
rolename=RoleName;user_name=UserName;password=password;
sqldialect=3;localecode=0000;blobsize=-1;commitretain=False;waitonlocks=True;
interbase transisolation=ReadCommited;
trim char=False" 
providerName="Borland.Data.AdoDbxClient"/>
To deploy without updating machine.config

  1. An application can also deploy without updating the machine.config by directly using the TAdoDbxProviderFactory class in the Borland.Data.AdoDbxClientProvider unit.
  2. Register the following files in the Global Assembly Cache (GAC) or have them in the same directory as the project .exe:
    • Borland.Data.AdoDbxClient.dll
    • Borland.Data.DbxCommonDriver.dll
    • Borland.Data.DbxDynalinkDriver.dll
    • Borland.Data.DbxReadOnlyMetaData.dll
    • Borland.Delphi.dll
    • Borland.VclDbRtl.dll
  3. Your project needs to reference Borland.Data.AdoDbxClient.dll. Click ProjectAdd Reference. In the Add Reference dialog, click Browse and select the file Borland.Data.AdoDbxClient.dll, which is in the Program Files\CodeGear\RAD Studio\5.0\bin directory.
  4. Create a <projectname>.exe.config file. For example, if the project is named Project1, the file name is Project1.exe.config. Add the following text to the file:

<configuration>
    <system.data>
        <DbProviderFactories>
            <add name="AdoDbx Data Provider" 
invariant="Borland.Data.AdoDbxClient" 
description=".Net Framework Data Provider for dbExpress Drivers" 
type="Borland.Data.TAdoDbxProviderFactory, Borland.Data.AdoDbxClient, Version=11.0.5000.0, Culture=neutral, PublicKeyToken=a91a7c5705831a4f"/>
        </DbProviderFactories>
    </system.data>
    <connectionStrings>
        <add name="IBConnection" 
connectionString="SomeName=IBCONNECTION;
drivername=Interbase;
database=someDatabasePathName\database.gdb;
rolename=RoleName;user_name=UserName;password=password;
sqldialect=3;localecode=0000;blobsize=-1;commitretain=False;waitonlocks=True;
interbase transisolation=ReadCommited;
trim char=False" 
providerName="Borland.Data.AdoDbxClient"/>
    </connectionStrings>
</configuration>

Note: Although this approach makes deployment easier, the TAdoDbxProviderFactory
can only create ADO.NET 2.0 objects for the AdoDbx Client provider.

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!