Unable to cast object of type ... After installing D2009

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for MySQL in Delphi and C++Builder
Post Reply
fritsr
Posts: 22
Joined: Tue 30 Oct 2007 03:49

Unable to cast object of type ... After installing D2009

Post by fritsr » Sat 29 Nov 2008 10:09

After I installed Delphi 2009, I get the error:
Unable to cast object of type 'Devart.DbxMda.DriverLoader.TCRDynalinkDriverLoader' to type 'Borland.Data.TDBXDriverLoader'.

I get this error in both Delphi 2007 and Delphi 2009 when I use the Data Explorer. I already had this error with the previous version of the dbExpress driver.

I also get this error in my ASP.NET applications, build with Delphi 2007.

So installing Delphi 2009, broke my Delphi 2007 installation, because I had the Devart driver installed.

How can I solve this?

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Wed 03 Dec 2008 09:56

The problem occurs because Delphi 2009 installation replaces Borland.Data.AdoDBXClient.dll with the newer version in the Global Assembly Cache.

To fix the problem:
Open the \Windows\Assembly folder in Windows Explorer.
Find Borland.Data.AdoDBXClient in the list and delete (uninstall) it.
Open the \Program Files\Common Files\CodeGear Shared\RAD Studio\Shared Assemblies\5.0 folder in another window. Drag and drop the Borland.Data.AdoDBXClient.dll file from this folder to the \Windows\Assembly folder. This will install the assembly from Delphi 2007.

Note that Data Explorer in Delphi 2009 will not work after this oparation. To make it work you should delete the assembly from Delphi 2007 from the \Windows\Assembly folder and place back the assembly from Delphi 2009 (from the \Program Files\Common Files\CodeGear Shared\RAD Studio\Shared Assemblies\6.0 folder).

Post Reply