New Posts New Posts RSS Feed: System.Data.DuplicateNameException
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

System.Data.DuplicateNameException

 Post Reply Post Reply
Author
chris94530 View Drop Down
Newbie
Newbie


Joined: 26-Sep-2012
Posts: 2
Post Options Post Options   Quote chris94530 Quote  Post ReplyReply Direct Link To This Post Topic: System.Data.DuplicateNameException
    Posted: 26-Sep-2012 at 1:42pm
I am accessing an ideablade object and occaisionally getting the following error... Any ideas on what could cause this?
System.Data.DuplicateNameException: A DataTable named 'Model:FacilityArea' already belongs to this DataSet.
   at System.Data.DataTableCollection.RegisterName(String name, String tbNamespace)
   at System.Data.DataTableCollection.BaseAdd(DataTable table)
   at System.Data.DataTableCollection.Add(DataTable table)
   at IdeaBlade.Persistence.PersistenceManager.AddTable(EntityTable pEntityTable)
   at IdeaBlade.Persistence.PersistenceManager.CreateTableAndInitialize(Type pEntityType)
   at IdeaBlade.Persistence.PersistenceManager.GetTable(Type pEntityType)
   at IdeaBlade.Persistence.PersistenceManager.ArePrimaryKeyColumns(EntityColumn[] pEntityColumns)
   at IdeaBlade.Persistence.PersistenceManager.XGetRelated(ICollection pEntities, EntityRelationLink pRelationLink, QueryStrategy pQueryStrategy, WorkState pWorkState)
   at IdeaBlade.Persistence.PersistenceManager.GetParent(Entity pEntity, EntityRelation pEntityRelation, QueryStrategy pQueryStrategy)
   at IdeaBlade.Persistence.PersistenceManager.GetParent[T](Entity pEntity, EntityRelation pEntityRelation, QueryStrategy pQueryStrategy)
   at IdeaBlade.Persistence.Entity.GetParent[T](EntityRelation pRelation, QueryStrategy pStrategy)
   at Model.SessionManifestDataRow.GetFacilityAreaImpl()
   at Model.SessionManifestDataRow.get_FacilityArea()
   at Session_Export.mSessionExportForm.mSessionUltraGrid2_BeforeCellActivate_1(Object sender, CancelableCellEventArgs e)
 
The line of code that generates this is...
 

Dim mSessionArea As String = mSession.SessionManifest.FacilityArea.ToString()

 
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 26-Sep-2012 at 2:38pm
Odd and occasional DataTable or metadata errors usually indicate a multi-threading issue of some sort.  Which DevForce Classic version are you running?
Back to Top
chris94530 View Drop Down
Newbie
Newbie


Joined: 26-Sep-2012
Posts: 2
Post Options Post Options   Quote chris94530 Quote  Post ReplyReply Direct Link To This Post Posted: 28-Sep-2012 at 7:25am
3.6.8.1
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 28-Sep-2012 at 9:26am
We did fix a few thread safety problems in the 3.7.3 release last year, but it's not clear those fixes would help here.   The PersistenceManager is not thread safe, by intention, but shared metadata and other structures are. 
 
Are you doing any multi-threading in your application?  Can you tell me anything more about when you see the error?
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down