Click here to Skip to main content
15,892,804 members

Comments by Michael Hulthin (Top 3 by date)

Michael Hulthin 20-Mar-24 9:24am View    
Looks like you're trying to delete bogus pointers, either because not properly initialized or you are accidently deleting them more than once?

How is m_arEdit initialized?
Will the entries always either be a nullptr or a valid CEdit* ?

To be safe I would also set the element to NULL after the delete and also you don't have to check for NULL, delete can handle null values.

Have you tried calling m_arEdit[j]->AssertValid(); for debug info (I think MFC has a helper method called that).
Michael Hulthin 15-Apr-22 8:59am View    
Google reports you need version 8, see https://devblogs.microsoft.com/ifdef-windows/announcing-net-community-toolkit-v8-0-0-preview-1/
Michael Hulthin 21-Sep-20 10:18am View    
What if you pass in year and month to the function (instead of "<year>-<month>") and change the where part to
... DATEPART(YEAR,Date) = @Year AND DATEPART(MONTH,Date) = @Month ...