In MOM 2005, TimeOfFirstEvent and TimeOfLastEvent are set to 12/30/1899

I recently had a customer ask me why the TimeOfFirstEvent and TimeOfLastEvent fields in an alert get set to 12/30/1899 when their custom application, which uses the MOM Connector Framework (MCF), uses UpdateAlerts() to set the resolution state of an alert.  I did some research and found that SQL Profiler actually shows this old date being passed to the MCF_DoAddPendingAlertUpdate stored procedure.  After doing a code review and review of the SDK I noticed that this will occur if you don't specifically set a value for TimeOfFirstEvent and TimeOfLastEvent and/or you don't flip the boolean bit on TimeOfLastEventUseExisting and TimeOfFirstEventUseExisting.

Comments (0)

Skip to main content