locked
Caching object causes error RRS feed

  • Question

  • User-953916277 posted
    When the DataTable "Org" is stored in Cache (or Session, doesn't matter), the error occurs when refreshing the page i.e. the DataTable is loaded from memory, not freshly created. When I turn caching/session variable off and load the DataTable from the database on each load, no error is ever thrown. So 1) Storing the object in memory results in error. 2) .Net 1.1 breaks working code (ran fine in 1.0). There is no column named "ORG" in the DataTable, so the error text seems inappropriate. Error: A column named 'ORG' already belongs to this DataTable: cannot set a nested table name to the same name. 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.DuplicateNameException: A column named 'ORG' already belongs to this DataTable: cannot set a nested table name to the same name. Source Error: Line 115: Line 116: DataRelation drel = new DataRelation("ORG_RECURSIVE", ds.Tables["ORG"].Columns["Org_ID"], ds.Tables["ORG"].Columns["Parent_Org_ID"]); Line 117: drel.Nested = true; // this line throws error Line 118: ds.Relations.Add( drel ); Line 119: Stack Trace: [DuplicateNameException: A column named 'ORG' already belongs to this DataTable: cannot set a nested table name to the same name.] System.Data.DataColumnCollection.RegisterName(String name, Object obj) +246 System.Data.DataRelation.set_Nested(Boolean value) +418 MERC.AircatWeb.Applications.NewUser.LoadTreeView() in c:\hmb_aircat_dev\c130_aircat\aircat_web\applications\newuser.aspx.cs:117 MERC.AircatWeb.Applications.NewUser.Page_PreRender(Object sender, EventArgs e) in c:\hmb_aircat_dev\c130_aircat\aircat_web\applications\newuser.aspx.cs:76 System.Web.UI.Control.OnPreRender(EventArgs e) +67 System.Web.UI.Control.PreRenderRecursiveInternal() +62 System.Web.UI.Page.ProcessRequestMain() +1466
    Tuesday, August 31, 2004 3:56 PM

All replies

  • User-953916277 posted
    Is there anyway to contact Microsoft officially about this discrepancy between v1.0 and v1.1 behavior i.e. submit a bug report?
    Thursday, September 2, 2004 10:35 AM