Developing for Dynamics GP

by David Musgrave (Perth, WA, Australia) and the Microsoft Dynamics GP Developer Support Team (Fargo, ND, USA)

An open operation on table '[TEMP Table]' errors

An open operation on table '[TEMP Table]' errors

  • Comments 4

David Meego - Click for blog homepageSometimes 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.

Page 1 of 1 (4 items)
Comments Information

PLEASE READ BEFORE POSTING

Please only post comments relating to the topic of this page.

If you wish to ask a technical question, please use the links in the links section (scroll down, on right hand side) to ask on the Newsgroups or Forums. If you ask on the Newsgroups or Forums, others in the community can respond and the answers are available for everyone in the future.

Leave a Comment
  • Please add 5 and 5 and type the answer here:
  • Post