I am writing a program that handles database operations for a IVR telephone system. I have numerous threads running that handle the db operations. The problem is that when many calls hangup at the same time my program has to log information to an Access database the threads crash on the open database call. I use a global critical section object around the code and I open the database in exclusive non-shared mode but still there are crashes. Note, that this works for a few hours under heavy stress but eventually crashes.
My question is that, has anyone encountered such problems with MFC Dao classes. Also, does AfxDaoInit and AfxDaoTerm have to always be called before and after any database operations? These functions seem to create their own threads and I have a feeling that they are screwing up. The crash seems to happen inside the Dao350.dll because when I click on the "Cancel" button on the famous Access Violation window MSStudio opens up with Dao350.dll dissambeley.
Please, let me know if this question is understandable. Any help would be appreciated. Thanks.