Object Reference not set to an instance of an Object

Asked

Viewed 502 times

3

I know the question is a little subjective, but maybe someone’s been through it and can help me.

I have an application developed in C#/Windows Forms/ADO.NET with Firebird database.

The error "Object Reference not set to an instance of an Object" was being presented intermittently in some system functionalities. I noticed that these features are linked to some database transaction (Insert/update/delete).

When trying to debug through a development server the application did not present the error. Not knowing what else to do, I simply restarted the IIS and the application stabilized. Someone has been there?

Note: I read in an article (https://support.microsoft.com/pt-br/kb/810098) from Microsoft that ADO.NET has not been fully tested in environment . NET Framework and that can cause intermittent problems. I thought it might be related to this.

  • 1

    It’s only subjective because it doesn’t have enough information. If it had, it would be very objective, after all, nothing more objective than a code and a clearly demonstrated error. This is programming or installation error.

  • You could include in the question an example of how this functionality is being done, I believe it can help to solve this question.

2 answers

1

I discovered that in several project methods, instances of Fbcommand and Fbdatareader objects were not using the Dispose method. After implementing this method the application stabilized.

1

The mentioned link deals with intermittent errors in ADO and ADO MD. These problems occur because the technology compatible with the Framework . NET is the technology ADO.NET.

The text highlights: "Care for ADO and ADO MD have not been fully tested in a Microsoft environment. NET Framework" and complements with a temporary solution until full migration from ADO to ADO.NET.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.