I am having to support a very old traffic management system, developed in Winforms, Microsoft Development Environment 2003, with .Net framework 1.1, using MySQL and ODBC. The application opens 3 connections at login, and assumes those connections remain open, passing them around to various forms and class libraries.
Everything seems fine, but the database connections randomly close. Debugging this is a nightmare because I have to use a VM and don't know my way around the older versions of Visual Studio, but even so, all that debugging or the log files tell me is that the connection is closed.
I wonder if I am wasting my time trying to debug this mess. Am I looking in the wrong place? Maybe the error is on MySQL and I should be looking there. I am struggling to figure out how to approach this problem. Any suggestions would be helpful.
Here is relevant part of the log file, which tells me nothing I don't already know:
System.InvalidOperationException: The connection is dead.
at System.Data.Odbc.OdbcConnection.ConnectionIsAlive(Exception innerException)
at System.Data.Odbc.OdbcConnection.get_State()
at System.Data.Odbc.OdbcConnection.get_IsOpen()
at System.Data.Odbc.OdbcConnection.GetDriverOdbcVersion()
at System.Data.Odbc.OdbcConnection.get_OdbcMajorVersion()
at System.Data.Odbc.OdbcConnection.get_IsV3Driver()
at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method)
at System.Data.Odbc.OdbcCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Odbc.OdbcCommand.ExecuteReader()
at DatabaseConnection.DBConnection.ExecuteQuery(String query, DBTransaction outterTransaction)
at DatabaseConnection.DBConnection.ExecuteQuery(String query)
at EnigmaForms.FormMain.CheckMySQLConnection() in c:\development\nutraffic\bts client\enigmaforms\forms\formmain.cs:line 1403
Aucun commentaire:
Enregistrer un commentaire