BUG: MDAC: SQL Server Driver May Return Error “Login Failed”
Symptoms
An ODBC application may fail to connect to SQL Server 6.x with the following error message returned:
[28000][Microsoft][ODBC SQL Server Driver][SQL Server] Login failed (4002)This problem occurs when applications use the Microsoft Data Access Components (MDAC) 2.1 version of the SQL Server driver (3.70.623) to make trusted connections to SQL Server 6.x and an older version (version 6.x or earlier) of the SQL Server client-side Net-Library DLL is the first on the path.
If all client-side Net-Library DLLs are updated to the SQL Server 7.0 version, this problem does not occur. Applications will not experience this problem when connecting to SQL Server 7.0. Finally, if the ODBC application is started from a directory that contains the updated client-side Net-Library DLL, the problem does not occur either.
Resolution
The MDAC 2.1 SQL Server driver is designed to automatically load the correct version of Net-Library from the <Winntroot>\System32 directory if an older version of Net-Library is initially loaded. However, when loading the Net-Library DLL from the System32 directory for the second time, the driver incorrectly assumes it is making a trusted connection to SQL Server 7.0, resulting an invalid login packet sent. This causes the connection to fail and the error to be returned.
