Watch your connection strings!
Posted: (EET/GMT+2)
I had to migrate one ASP.NET application I had written with Delphi 8 to the newer version of Delphi, Delphi 2005 in fact.
I've been using a late beta version of Delphi 2005, and when I compiled my application with the new version and ran the application, all I got were error messages similar to these:
The located assembly's manifest definition with name 'Borland.Data.Interbase' does not match the assembly reference. Exception Details: System.IO.FileLoadException: The located assembly's manifest definition with name 'Borland.Data.Interbase' does not match the assembly reference.
Or:
File or assembly name Borland.Data.Interbase, or one of its dependencies, was not found. Exception Details: System.IO.FileNotFoundException: File or assembly name Borland.Data.Interbase, or one of its dependencies, was not found.
First, I thought that this was a beta issue, and thought that maybe building a test application would show me where the problem was. But, my test application got flawlessly it's connection to my InterBase database, and so I knew the problem was in my application, not in Delphi itself.
I checked the version of the Borland.Data.Interbase.dll assembly on my PC, and found it be version 2.0.0.0, when my application was requesting a version 1.5.1.0, which obviously wasn't found.
I tried to search high and low for this reference, but couldn't find anything. But finally, I checked my connection string (in this application I create every component in code), and there it was! I didn't recall that my ADO.NET connection string held the version of the required DLL, and this is where my application got the idea to search for an earlier version of the DLL that came with Delphi 8.
Today's lesson: if nothing else helps, check yer connection strings!