Error When adding a new operator with Acess DB

Last post 03-05-2008, 2:27 PM by Scottswe. 2 replies.
Sort Posts: Previous Next
  •  03-05-2008, 9:51 AM 37582

    Error When adding a new operator with Acess DB

    When I use Access DB I get an error adding a third operator.
    Or if I try to aassign an operator to a department I get the following error:
     
     

    Server Error in '/fastchat/steiner' Application.

    The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship.  Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again.

    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.Data.OleDb.OleDbException: The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship.  Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again.

    Source Error:

    Line 231:
                Line 232:		string deptname=(string)ManageLiveSupport.DataGrid2.DataKeys[Item.ItemIndex];
                Line 233:		CuteChat.ChatWebUtility.AddAgent(deptname,CuteChat.ChatProvider.Instance.ToUserId(name));
                Line 234:
                Line 235:		DataGrid3.DataBind();

    Source File: d:\hosting\inetguys\fastchat\steiner\ManageDepartments.aspx    Line: 233

    Stack Trace:

    [OleDbException (0x80004005): The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship.  Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again.]
                System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) +267
                System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) +192
                System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) +48
                System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) +106
                System.Data.OleDb.OleDbCommand.ExecuteNonQuery() +108
                CuteChat.MSAccessDataProvider.AddAgent(Int32 departmentid, String userid) +166
                CuteChat.ChatDataManager.AddAgent(Int32 departmentid, String userid) +238
                CuteChat.ChatDataManager.AddAgent(String department, String userid) +127
                CuteChat.ChatWebUtility.AddAgent(String depname, String agentid) +135
                ASP.DataGrid2ItemScope.AddAgentButton_Click(Object sender, EventArgs e) in d:\hosting\inetguys\fastchat\steiner\ManageDepartments.aspx:233
                System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
                System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
                System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
                System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
                System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
                System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
                


    Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832

    Scott
  •  03-05-2008, 1:41 PM 37588 in reply to 37582

    Re: Error When adding a new operator with Acess DB

    Scottswe,
     
    We are investigating this issue and will get back to you as soon as possible.
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  03-05-2008, 2:27 PM 37594 in reply to 37588

    Re: Error When adding a new operator with Acess DB

    I did some investigating and I changed the access db in two places
     
    1. in table: CuteChat4_SuupportAgent
          Changed DepartmentID  - took off Primary Key and allowed duplicates.
    That only makes sense for this column has duplicates.
     
    2. In Table: SampleUsers
          Change Email field to be NOT required.  Since you do not have that field in the Manage Operators page, adding the first operator works fine, but when adding a second it errors out because it is trying to insert a "blank" email which is a duplicate and not accepted.
     
     

    Scott
View as RSS news feed in XML