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

ID: Q242378


The information in this article applies to:
  • Microsoft SQL Server version 6.5


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:

Q218877 Mfc40.dll Causes Programs to Display Wrong Date After 01/01/2000
For more information about how Microsoft products are affected by year 2000 (Y2K) issues, please see the Microsoft Year 2000 Portal Page.

Additional query words: Y2K KB2000 Y2Kreviewed

Keywords : SSrvProg
Version : winnt:6.5
Platform : winnt
Issue type : kbprb


Last Reviewed: October 8, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.