aceoledb.dll crash

Rudolf Meier 291 Reputation points
2023-09-17T14:56:54.9333333+00:00

My application opens 2 connections to 'accdb' files. Whenever I close the second connection I have an access violation in the aceoledb.dll (16.0.5320.1000). I don't see what could be wrong in my code. I use ATL and this should already ensure that I cannot call release too often (in fact, I'm not calling it at all, I'm using the 'close' functions which internally call release in case the pointer is not already NULL). I did read from other's that they have similar problems with other versions. That's why I think that this could be a bug.

Access Development
Access Development
Access: A family of Microsoft relational database management systems designed for ease of use.Development: The process of researching, productizing, and refining new or existing technologies.
877 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Tanay Prasad 2,120 Reputation points
    2023-09-18T05:25:28.1966667+00:00

    Hi,

    While I can't directly debug your code, I can provide you with some general steps and suggestions to help identify and resolve the issue:

    1. To prevent double-closing or double-releasing, which can result in access violations, make sure the pointer is NULL before closing or releasing a connection.
    2. To catch potential errors or exceptions and easily handle them, enclose database-related code in exception handling blocks. This can help in avoiding unexpected crashes.
    3. Make sure you are utilizing the ACEOLEDB provider's most recent version. If you think the provider may have a bug, see if Microsoft has any updates or patches available.
    4. Check your code for any cases of resource leaks, such as open recordsets, open database connections, or other objects that are not properly closed or released.
    5. Make sure that any third-party libraries or database access-related components used by your application are current and compatible with the version of ACEOLEDB you are using.
    6. Database corruption can lead to access violations. Ensure that your database files are not corrupted and can be accessed without issues.

    In case your access database is corrupted, you can use third-party access database repair tools to fix the corruption or you can reach out to Microsoft for more help.

    Best Regards

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.