Oledb Connection issue 16.0

Sagar Pithadiya 6 Reputation points
2023-12-04T19:54:50.83+00:00

Erron :-Framework version : v4.0.30319

The process was terminated due to unhandled exception

exception info = system.accessviolationexception

system.data.oledb.datasourcewrapper.initializeandcreatesession

system.data.oledb.oledbconnection.open()

sometimes this error occurred but sometimes work properly while trying to open oledb connection please help to identify root cause for this issue. above error not encounter in exception but itis encounter in event log as a complus error.

Developer technologies .NET .NET Runtime
{count} votes

1 answer

Sort by: Most helpful
  1. Jiachen Li-MSFT 34,221 Reputation points Microsoft External Staff
    2023-12-06T09:17:43.0866667+00:00

    Hi @Sagar Pithadiya ,

    Ensure that all disposable objects like OleDbConnection, DataTable, and DataSet are properly disposed of. While you've disposed of the DataTable object (dt), remember to also dispose of the DataSet (oDS) after its use.

    Best Regards.

    Jiachen Li


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    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.