PRB: MFC Function May Incorrectly Parse a Date After the Year 2000 (242378)



The information in this article applies to:

  • Microsoft SQL Server 6.5

This article was previously published under Q242378

SYMPTOMS

Programs that use the Microsoft Foundation Classes (MFC) COleDateTime function may incorrectly parse a date after the year 2000.

Technically, SQL Server 6.5 is not affected. Microsoft has investigated all areas of SQL Server that link into MFC and no calls into the MFC COleDateTime function have been identified.

MFC is not used by the SQL Server engine. SQL Server administration tools, as well as the Distributed Transaction Coordinator (DTC), issue calls into MFC. SQL Server code review has not identified any product area that uses the COleDatetime function in question.

CAUSE

An internal function within MFC40.dll is designed to add 1900 to every two-digit date that is passed to it. For example, 99 is returned as 1999. If more than two digits are passed, nothing is added. Programs that use this function may incorrectly parse a date after the year 2000 (for example, January 1, 2000, may become January 1, 100).

SQL Server 6.5 setup copies the MFC40.dll into the Binn subdirectory of the SQL Server installation. While applications other than SQL Server would typically load an instance of MFC from the System directory, the DLL may be loaded from the Binn directory if either of the following cases is true:
  • The application was started from the Binn directory.

    -or-
  • No other instances of MFC40.dll exist on the system.
Such applications are potentially exposed to this Y2K problem. Microsoft recommends that you search for all instances of MFC40.dll on the system and replace them with an updated version.

WORKAROUND

To download an updated MFC40.dll file that resolves this problem, perform the following steps:
  1. Connect to the Microsoft Download Center at http://www.microsoft.com/downloads/search.asp.
  2. In the Product Name drop-down list, select SQL Server 6.5.
  3. In the Operating System drop-down list, select the appropriate operating system (Windows 95/98, Windows NT (DEC ALPHA), Windows NT 4.0, or Windows 2000).
  4. Click Find It! and then click the link to "Year 2000 Update for MFC40.dll".

MORE INFORMATION

For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

218877 Mfc40.dll Causes Programs to Display Wrong Date After 01/01/2000


Modification Type:MajorLast Reviewed:10/16/2003
Keywords:kbprb KB242378