Also look at this related post: FP: Couldn’t close table! Dynamics GP Error Solution
Frequently this dialog pops up on my dynamics GP,
A remove range operation on table ‘syContentPageXMLCache’ cannot find the table
It happens after leaving the PC overnight or for prolonged periods during the day. The issue stems from the fact that the machine is set to go to sleep in Windows power management settings, if left unattended for any length of time.
Luckily I identified this immediately due to previous experience diagnosing slow downs in GP due to GP reminders and the home page also an issue with particular user who gets a dead lock from the building of the home page, causing GP to lock up. The home page has a rendering engine to produce it, and it uses XML internally to build, hence the reference to XML in the error. See below for some of the various scripts running to build the homepage.
Line 25: F DeleteForUserID() of form syHomePageLayout Line 26: F DeleteRange() of form syHomePageLayout Line 28: F Delete() of form syHomePageLayout Line 93: P SetColumnLayout of form syHomePage f Line 94: P SetColumnLayout of form syHomePage Line 95: P SetColumnStackPosition of form syHomePage Line 96: P SetPageMode of form syHomePage Line 97: F Commit() of form syHomePage Line 100: F Get() of form syHomePage Line 101: F Create() of form syHomePage Line 102: P Release of form syHomePage Line 125: F GetColumnStackPosition() of form syHomePage Line 128: F GetColumnStackPositionForUser() of form syHomePage Line 136: P Destroy of form syHomePage Line 137: P ClearRange of form syHomePageLayout Line 138: P Destroy of form syHomePageLayout Line 139: F Get() of form syHomePageLayout Line 140: P AddNew of form syHomePageLayout Line 141: P SetIndex of form syHomePageLayout Line 142: F Create() of form syHomePageLayout Line 143: P RangeWhere of form syHomePageLayout Line 145: F Commit() of form syHomePageLayout Line 146: P SetMode of form syHomePageLayout Line 147: P SetSelected of form syHomePageLayout Line 148: P SetDictID of form syHomePageLayout Line 149: P SetColumnNumber of form syHomePageLayout Line 150: P SetSequenceNumber of form syHomePageLayout Line 151: P SetMetricSequence of form syHomePageLayout Line 152: P SetVisible of form syHomePageLayout Line 165: syHomePageLayout Line 166: syHomePage Line 185: syHomePageLayout Line 186: syHomePage Line 205: syHomePageLayout Line 206: syHomePage
GP creates SQL server temp tables to support the home page functionality and cache some of the data generated. By design SQL temp tables only exist as long as that SQL session is kept active (if user scoped). So if the machine goes to sleep, the SQL session that GP has held open, to maintain the existence of the temp table is eventually closed by SQL server due to inactivity. On closing the session the table is removed from SQL.
The user then wakes the machine, and performs an action, for example selecting a shortcut, causing GP to try and work with the temp table to render the Home page again. This action fails as the table is no longer there and the error pops up. The number ##2420326 is actually the table name in SQL that has been dropped. Temp tables are preceded with # or ## depending on the scope.
On closing GP, in these circumstances, it is not unexpected to the get the “FP: Couldn’t close table!” error. Caused by table that was never closed correctly due to it not existing…
Recently a fault on a network connection was also causing this to sporadically happen. The network was lost from time to time on a particular machine, resulting in the same error occurring.
The only way of preventing the error is to prevent the network connection from dropping. Hence disable any power management settings that cause sleep, if on Terminal Server or Citrix environment, look at the way sessions are handled and kept alive.
If this is not the cause, then its time to check for faulty network adapters, network configuration or hardware.