Hi,
I am getting this error when i've tried connecting my ASP.NET web application written
in C# with mysql. But the cause of error as displayed by stack trace is the code where I am filling the data set using data adapter.
i am using Mysql Server Version 5.0 on my local machine and Mysql Connector version : mysql-connector-net-5.0.2-beta
I am not getting this error locally on my machine (Windows XP) but on the server this error occurs frequently, the server is (Windows 2003 SP2).
Server Error in '/' Application.
Item has already been added. Key in dictionary: '2128449582' Key being added: '2128449582'
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: Item has already been added. Key in dictionary: '2128449582' Key being added: '2128449582'
Source Error:
Line 75: DataSet ds = new DataSet();
Line 76: MySqlDataAdapter adapter = new MySqlDataAdapter(command);
Line 77: adapter.Fill(ds);
Line 78: connection.Close();
Line 79: if (ds.Tables.Count > 0)
Source File: c:\wow\App_Code\Services.cs Line: 77
Stack Trace:
[ArgumentException: Item has already been added. Key in dictionary: '2128449582' Key being added: '2128449582']
System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add) +2807907
System.Collections.Hashtable.Add(Object key, Object value) +11
MySql.Data.MySqlClient.ProcedureCache.AddNew(MySqlConnection connection, String spName) +106
MySql.Data.MySqlClient.ProcedureCache.GetProcedure(MySqlConnection conn, String spName) +104
MySql.Data.MySqlClient.StoredProcedure.ProcessCommandText() +153
MySql.Data.MySqlClient.StoredProcedure.get_ProcessedCommandText() +16
MySql.Data.MySqlClient.Statement.BindParameters() +38
MySql.Data.MySqlClient.PreparableStatement.Execute(MySqlParameterCollection parameters) +31
MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) +527
MySql.Data.MySqlClient.MySqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +4
System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +7
System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +141
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +86
Services.ExecWithResult(String ProcName, MySqlParameter[] Params) in c:\wow\App_Code\Services.cs:77
Message.GetFriends(Int32 mem_id) in c:\wow\App_Code\Message.cs:172
Profiles_memberfriends.fillmembers() in c:\wow\Profiles\memberfriends.aspx.cs:99
Profiles_memberfriends.Page_Load(Object sender, EventArgs e) in c:\wow\Profiles\memberfriends.aspx.cs:70
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061
Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832
If you can help out me on this issue, it will be of great help.
Thanks and Regards,
Vishwa