I initially developed a program using Visual Studio .NET 2003. When I upgraded to VS5 and re-built the program, the program started throwing assertions from the ATL CTime class. It turns out that there's a bug in VS5 where the CTime class has started checking its input and throwing assertions on invalid data.
Off the top, that sounds good but my program had used the ODBC Wizard to build CRecordSet classes for a couple of the QB tables I'm processing. The program was issuing a SQL search statement to retrieve matching records and asking that only those fields that I'm interested in be returned. Unfortunately, the date and time fields in the record are not of interest to me. Since the class is created on the stack and thus uninitialized, the "validation" was failing and resulted in many false assertions. Microsoft is aware of the problem (http://support.microsoft.com/kb/155721/EN-US/) and has "fixed" it by having the Class Wizard initialize fields to 0.
I was able to work around the problem by having the SQL search return all fields from matching records (so the date/time fields are properly set).
|