How to access different versions of ADO.net driver?
Hi, we want to access data via a SQL Anywhere ADO.net driver. The issue is that this driver has slightly different versions on different servers and developer machines, while the package should be the same across the servers. The version info, as found in machine.config is e. g. as follows: <add name="SQL Anywhere 12 Data Provider" invariant="iAnywhere.Data.SQLAnywhere" description=".Net Framework Data Provider for SQL Anywhere 12" type="iAnywhere.Data.SQLAnywhere.SAFactory, iAnywhere.Data.SQLAnywhere.v3.5, Version=12.0.1.31523, Culture=neutral, PublicKeyToken=f222fc4333e0d400" /> <add name="SQL Anywhere 12 Data Provider" invariant="iAnywhere.Data.SQLAnywhere" description=".Net Framework Data Provider for SQL Anywhere 12" type="iAnywhere.Data.SQLAnywhere.SAFactory, iAnywhere.Data.SQLAnywhere.v3.5, Version=12.0.1.34573, Culture=neutral, PublicKeyToken=f222fc4333e0d400" /> It seems that the ADO.net connection manager references the exact version of the driver in its "Qualifier" property, which is e. g. iAnywhere.Data.SQLAnywhere.SAConnection, iAnywhere.Data.SQLAnywhere.v3.5, Version=12.0.1.3473, Culture=neutral, PublicKeyToken=f222fc4333e0d400 This property is not available for configurations. I tried to edit the machine.config file to contain: <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="SQL Anywhere 12 Data Provider" publicKeyToken="f222fc4333e0d400" culture="neutral" /> <bindingRedirect oldVersion="12.0.1.0-12.0.1.65534" newVersion="12.0.1.34573" /> </dependentAssembly> </assemblyBinding> </runtime> where the newVersion value matches the version installed on the machine. But this does not seem to be used, and I get the same error as without this entry if the version in the Qualifier property does not exactly match the version installed on the machine: Error: Microsoft.SqlServer.Dts.Runtime.DtsCouldNotCreateManagedConnectionException: Could not create a managed connection manager. This error does not occur if the version info exactly matches the version of the driver installed. Any idea how I could get this running? Frank
July 18th, 2012 1:08pm

The answer is to standardize on the version of the driver installed in your environments. Even assuming what you are trying to do is possible, it invalidates any testing and release process you have.Chuck Pedretti | Magenic North Region | magenic.com
Free Windows Admin Tool Kit Click here and download it now
July 18th, 2012 1:18pm

Hi, I understand this would be the best solution. But are there not any possibilities to access different versions on different machines? We are purely reading a few tables, no complex SQL etc., so the assumption is that there will not be any behavior differences between slightly different versions. Frank
July 18th, 2012 5:20pm

Hi, I finally found that I had not used the assembly name but the provider name as the version mapping. After changing the entry in machine.config as follows, everything works even if the driver versions do not match exactly: <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="iAnywhere.Data.SQLAnywhere.v3.5" publicKeyToken="f222fc4333e0d400" culture="neutral" /> <bindingRedirect oldVersion="12.0.1.0-12.0.1.65534" newVersion="12.0.1.34573" /> </dependentAssembly> </assemblyBinding> </runtime> Frank
Free Windows Admin Tool Kit Click here and download it now
July 20th, 2012 3:52pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics