none
Exception: A column named '?' already belongs to this DataTable

    Question

  • Hello,

    I'm getting the following problem. In the explorer area when a choose a specific entity from the "Entities" menu, it gives me an unknown error. In event viewer I can see the following message:

    Exception information: 
      Exception type: DuplicateNameException 
      Exception message: A column named '?' already belongs to this DataTable. 
    
    Stack trace:  at System.Data.DataColumnCollection.RegisterColumnName(String name, DataColumn column, DataTable table)
      at System.Data.DataColumnCollection.BaseAdd(DataColumn column)
      at System.Data.DataColumnCollection.AddAt(Int32 index, DataColumn column)
      at System.Data.DataColumnCollection.Add(String columnName, Type type)
      at Microsoft.MasterDataServices.WebUI.ServiceAdapter.ConvertEntityMembersToDataTable(Collection`1 members, DisplayType displayType)
      at Microsoft.MasterDataServices.WebUI.UserControls.Common.Attribute.GetData(Boolean allRecords, Boolean idOnly, String filterCriteria)
      at Microsoft.MasterDataServices.WebUI.UserControls.Common.Attribute.get_GridData()
      at Microsoft.MasterDataServices.WebUI.UserControls.Common.Attribute.LoadGrid(Boolean clearGridData)
      at Microsoft.MasterDataServices.WebUI.UserPages.Explorer.Attribute.SetupAttributeControl()
      at System.Web.UI.Control.OnLoad(EventArgs e)
      at System.Web.UI.Control.LoadRecursive()
      at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    
    

    This only happens for some users, but I don't have any specific permissions for that entity for no one.

    Can someone help me?

    Thanks in advance.


    Helena Monteiro
    Tuesday, November 09, 2010 10:55 AM

All replies

  • Hello Helena

    maybe the entity name is a reserved keyword ?

    what is the name of your entity please ?


    Note: Please vote/mark the post as answered if it answers your question/helps to solve your problem. _________________________________________________________ Regards, Xavier Averbouch, Consultant, Avanade France
    Thursday, December 02, 2010 8:19 AM
    Moderator
  • I just replied to another thread that could have something to do with this also.

    I don't think it's about reserved keywords but sure it seems to be a bug if some kind.

    I'd appreciate if someone could confirm this.

    Wednesday, February 22, 2012 10:35 AM
  • Seems  MDM is crashing while converting the EntityMember into DataTable. So I assume MDM has successfully fetched data from database and its unable to convert into Datatable.So Cause is .Net are getting duplicate information While trying to cast into datatable.This may be -

    1.Duplicate information although its unlikely. (Maye be Coloumn name or entity member).Yoi may want to check the records in db for the particular entity.

    Clue can be

    at System.Data.DataColumnCollection.AddAt(Int32 index, DataColumn column)
      at System.Data.DataColumnCollection.Add(String columnName, Type type)
      at Microsoft.MasterDataServices.WebUI.ServiceAdapter.ConvertEntityMembersToDataTable(Collection`1 members, DisplayType displayType)

    2.Reserved words are used as Xavier Mentioned below.


    • Edited by AnupKumar Tuesday, February 28, 2012 4:24 AM
    Tuesday, February 28, 2012 4:23 AM
  • I got assisted by Nathan LiuCheng in the partner forums and it found out that there was a hotfix to this issue:

    FIX: "A column named 'AttributeName' already belongs to this DataTable" error when you open an entity in Master Data Manager in SQL Server 2008 R2 MDS
    http://support.microsoft.com/kb/2592060

    I installed the SQL Server 2008 R2 SP1 Cumulative Update 5. After installing seems like the bug described is gone!

    So, thank you very much for your help !

    Tuesday, March 13, 2012 8:22 AM