Wasted
✅ Random error only when app is run on same server as database
I made a simple dotnet application that uses a remote database
When I run it on my local computer it works flawlessly, I dont see the error and the application works
When I run it on the same server as the database half of the time I get errors half the time it works correctly with no error
I was told the connection needs to be closed but I dont think I did that correctly as I still get the same errors
The errors I get are
This method may not be called when another read operation is pending.
or
Connection must be valid and open.
or
Object reference not set to an instance of an object.
This is most common, the save does appear to work as the database gets updated but the app shows this error
This is the database class
22 replies