Found this error when using a Windows 2008R2 x64 server connecting to a SQL 2008R2 x64 Server with an old Windows 2000 ASP.net 1.1 website. Due to the fact that the database and website were designed on 32bit architecture, we needed to connect from the x64 webserver to the x32 database using an ODBC Connector.
But instead of using the normal ODBC Connector you need to run the 32bit version
To configure 32-bit mode for the server
Open a command prompt and run the following:
%windir%system32inetsrvappcmd set config -section:applicationPools -applicationPoolDefaults.enable32BitAppOnWin64:true
Note: This setting applies only to 64-bit servers.
Note: Also ensure the website is running under a ASP.net 1.1 application pool with 32bit enabled.