Unhandled exception in the Data Access Tool when editing or creating a UDL

The following error dialog may be displayed when using the Data Access Tool (DAT) included with Host Integration Server 2006 to create or edit a Universal Data Link (UDL):

Note: This can also occur when using the Data Access Tool included with the Microsoft OLEDB Provider for DB2 versions that are bundled with Microsoft SQL Server 2005 Feature Pack and Microsoft SQL Server 2008 Feature Pack.

Data Access Tool

Unhandled exception has occurred in your application. If you click Continue, the
application will ignore this error and attempt to continue. If you click Quit, the
application will close immediately.

Method not found: 'System.Windows.Forms.DialogResult
d(System.Collections.ArrayList, Boolean,
Microsoft.HostIntegration.DataAccessLibrary.DataSourcePlatform ByRef,
Microsoft.HostIntegration.DataAccessLibrary.IConnectionString ByRef, Boolean,
System.String ByRef, Boolean ByRef, Boolean ByRef, Boolean ByRef, Boolean ByRef,
Boolean ByRef)'.

The error occurs when there are multiple instances of the Microsoft.HostIntegration.DataAccessLibrary.dll registered in the Windows Global Assembly Cache (GAC).

In order to resolve the problem, you need to remove the extra instances of Microsoft.HostIntegration.DataAccessLibrary.dll from the GAC. You should uninstall all of the instances that do not match the version of the Microsoft.HostIntegration.DataAccessLibrary.dll that exists in the %SNAROOT%

  1. Go to the %SNAROOT% folder (e.g. C:\Program Files\Microsoft Host Integration
    Server 2006\system) to note the file version of the Microsoft.HostIntegration.DataAccessLibrary.dll (for example, version 7.0.2758.0 is the file version released with HIS 2006) that is currently installed.

  2. Open Windows Explorer and go to the %SystemRoot%\assembly (e.g. C:\Windows\assembly) folder.

  3. Search for any Assembly Name instances of Microsoft.HostIntegration.DataAccessLibrary.

  4. If there are multiple instances, you need to uninstall the versions that don't match the version of the installed Microsoft.HostIntegration.DataAccessLibrary.dll.

    Note: You can determine the version of the Assembly by right-clicking the assembly, clicking Properties, and then click the Version tab. The File version shown should match the version of the Microsoft.HostIntegration.DataAccessLibrary.dll that is installed on the system.

  5. If the file version does not match, right-click the Assembly Name and click Uninstall to remove the assembly from the GAC.

Once the extra Microsoft.HostIntegration.DataAccessLibrary assemblies are uninstalled, run the DAT to verify the you can edit and create UDLs without error.

This problem is most likely to occur when multiple versions of the Host Integration Server data providers (including the standalone DB2 provider included in the SQL Server 2005/2008 Feature Packs) have been installed and removed over time. In such instances, one or more instances of the Microsoft.HostIntegration.DataAccessLibrary.dll may not be properly removed from the GAC.