Cannot disconnect. Entity in use - MyEntity

24 views
Skip to first unread message

Steve Burrows

unread,
Sep 24, 2025, 1:59:46 AMSep 24
to Migrated By Firefly
Any idea what this error is indicating ?

MyEntity is the From
Happens the 2nd time I run the program from the Menu.
Exception is triggered from somewhere in OnStart - or if I comment out everything in OnStart, when it exits.
There is nothing particularly fancy about the program. Its had a few changes since conversion but nothing earth shattereing.

Steve Burrows

unread,
Sep 24, 2025, 5:22:03 AMSep 24
to Migrated By Firefly
Found the cause.
Have added this type of code to some of our Types. 
Second time run the parent program, the entity is not null, but it has been disconnected.
Simply commenting out the "if" so it always creates a new Models.Planners() resolves the Disconnet exception, but then I suspect I am probably making things worse than not having the feature in the 1st place.

static Models.Planners _entity;
public Text Description()
{
    if (_entity == null)
        _entity = new Models.Planners();
    return _entity.GetValue(_entity.Description, _entity.Planner.IsEqualTo(this));
}
Reply all
Reply to author
Forward
0 new messages