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.

.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,130 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Jiachen Li-MSFT 27,001 Reputation points Microsoft Vendor
    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