An open operation on table ‘[TEMP Table]’ errors


David Meego - Click for blog homepageThis is a reposting of an article I originally wrote on my Developing for Dynamics GP blog.

Sometimes Microsoft Dynamics GP reports unusual errors with temporary tables. Here are some example error messages that you might see:

An open operation on table ‘IV_Reconcile_PO_TEMP’ has an incorrect record length.

An open operation on table ‘PM_Inquiry_Summary_TEMP’ failed because the path does not exist.

While these errors can seem confusing and not make any sense at first, there is one important fact that will help explain how the error can be generated.

Not all temporary tables used by Microsoft Dynamics GP are SQL tables created in the tempdb system database.  Many temporary tables used for quick processing in windows use local ctree temporary tables.

These ctree temporary tables are implemented as ctree files in the local workstation’s temp folder as pointed to by the %TEMP% environment variable. The files will be named TNTXXXX and will have the extensions .dat, .idx and .tmp.  These files are created when the related table buffers are first referenced in the code and are usually deleted when the table buffer is no longer being used. However, sometimes the files are left behind in the temp folder.

The errors can occur when

  • the temporary folder as specified in the %TEMP% environment variable does not exist.
  • the temporary folder as specified in the %TEMP% environment variable does not have write permissions.
  • the drive that contains the temporary folder as specified in the %TEMP% environment variable is full.
  • the temporary filename selected by the runtime engine matches one or more existing files with the same extensions (.dat, .idx or .tmp).

The solution to issues with these temporary tables is to cleanup the temporary folder. Please exit all applications on the workstation and delete as many of the contents of the folder as possible. Some files will be in use and cannot be deleted.

Note: the Dexterity system can also use ctree memory tables which will be stored with their actual names in a TNTXXXX folder.  These tables remain available to the instance of the application until it is shut down.

David

21-Apr-2010: Also look at Allan Cahill’s Unexplained Temp Table Errors post on this blog.

This article was originally posted on the Developing for Dynamics GP Blog and has been reposted on http://www.winthropdc.com/blog.

7 thoughts on “An open operation on table ‘[TEMP Table]’ errors

  1. Hi David, I encounter different massage but i think this is related. this is what i get "An operation on table 'MBS_trigger failed' because the path does not exist". i've tried to what you recomend and we still encounter the issue. can you help us to resolve this. Thank you.

    Like

Please post feedback or comments

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.