BUG? Setting MySqlCommand.CommandText in DataAdapter
BUG? Setting MySqlCommand.CommandText in DataAdapter
App first developed with version 3.50.14. Recently upgraded to 4.85.35.
Error:
Runtime exception randomly occurs when setting SelectCommand.CommandText. It occurs seldom and the same code is run a lot of times each day, called from different contexts (Windows service app and WebService app).
Code that fails:
this.selComAES.CommandText = resources.GetString("selComAES.CommandText");
Background:
I have one DB classlibrary project. One class is AESHandler, it has several CoreLab.MySql.MySqlDataAdapter's, one of them is daAES. It is used to fill a DataSet with data together with several other DataAdapters. The DataSet and DataAdapters was created with 3.50.14. After upgrading to 4.85.35 I have CHANGED the daAES's Select/Insert/Update/DeleteCommand. None of the other DataAdapters commands has been changed since the CoreLab upgrade. The error seems to occur only on the Command that has been changed after the upgrade. It is still a little difficult to know exactly since it only happens once in a while (2 times since release of new version on friday).
UPDATE: The error happens randomly at all the places in the generated code where SelectCommand is set. I don't set SelectCommand in my own code that I know of (and I don't have the time to check it right now). At least this means that the differences in version between generation of commands is not the problem here.
Temporary "fix/workaround":
I have made a retry function in the Windows Service app so that the same code is run again after 3 seconds if it somehow fails. We have had numerous strange problems with the CoreLab component before too so this as been very helpful so far. The WebService app has no such function yet so end users of our frontend gets this exception from time to time.
StackTrace: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index\n
Addtitional Info: at System.Collections.ArrayList.RemoveAt(Int32 index)
at CoreLab.Common.GlobalComponentsCache.AddToGlobalList(IComponent component, String groupName)
at CoreLab.Common.DbCommandBase.set_Owner(Object value)
at ProTeria.DB.AESHandler.InitializeComponent() in E:\PROJECTS\dotNET\dotNET_2\DB\AESHandler.Designer.cs:line 615
Error:
Runtime exception randomly occurs when setting SelectCommand.CommandText. It occurs seldom and the same code is run a lot of times each day, called from different contexts (Windows service app and WebService app).
Code that fails:
this.selComAES.CommandText = resources.GetString("selComAES.CommandText");
Background:
I have one DB classlibrary project. One class is AESHandler, it has several CoreLab.MySql.MySqlDataAdapter's, one of them is daAES. It is used to fill a DataSet with data together with several other DataAdapters. The DataSet and DataAdapters was created with 3.50.14. After upgrading to 4.85.35 I have CHANGED the daAES's Select/Insert/Update/DeleteCommand. None of the other DataAdapters commands has been changed since the CoreLab upgrade. The error seems to occur only on the Command that has been changed after the upgrade. It is still a little difficult to know exactly since it only happens once in a while (2 times since release of new version on friday).
UPDATE: The error happens randomly at all the places in the generated code where SelectCommand is set. I don't set SelectCommand in my own code that I know of (and I don't have the time to check it right now). At least this means that the differences in version between generation of commands is not the problem here.
Temporary "fix/workaround":
I have made a retry function in the Windows Service app so that the same code is run again after 3 seconds if it somehow fails. We have had numerous strange problems with the CoreLab component before too so this as been very helpful so far. The WebService app has no such function yet so end users of our frontend gets this exception from time to time.
StackTrace: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index\n
Addtitional Info: at System.Collections.ArrayList.RemoveAt(Int32 index)
at CoreLab.Common.GlobalComponentsCache.AddToGlobalList(IComponent component, String groupName)
at CoreLab.Common.DbCommandBase.set_Owner(Object value)
at ProTeria.DB.AESHandler.InitializeComponent() in E:\PROJECTS\dotNET\dotNET_2\DB\AESHandler.Designer.cs:line 615
-
- Posts: 16
- Joined: Tue 03 Apr 2007 20:21
Wcarlson40, I cannot find our previous correspondence with Trygvelo. So, I cannot tell you for sure whether this particular problem was solved.
1. Please try the latest version (5.80.146). I have just sent to your e-mail address a download link for the trial version with a prolonged evaluation for the case if your subscription is not valid at the moment.
2. If the problem persists with the 5.80.146 version as well, please send us a small test project with the DDL/DML script so that we can reproduce the issue in our environment. Also please specify the version of your MySQL Server.
1. Please try the latest version (5.80.146). I have just sent to your e-mail address a download link for the trial version with a prolonged evaluation for the case if your subscription is not valid at the moment.
2. If the problem persists with the 5.80.146 version as well, please send us a small test project with the DDL/DML script so that we can reproduce the issue in our environment. Also please specify the version of your MySQL Server.