Показать сообщение отдельно
Старый 01.11.2012, 17:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,491 / 846 (79) +++++++
Регистрация: 28.10.2006
sashanazarov: xRecord.setTmp() and inactive configuration keys
Источник: http://sashanazarov.blogspot.com/201...-inactive.html
==============

Be carefull when using setTmp method on table buffers. If your table is assigned a configuration key, turning it off will make this line of code throw an error at runtime: "Table '' of type TempDB cannot be changed to table of type InMemory".

For example, \Classes\SysRecordTemplateEdit\setFormDataSourceRecord has this problem. It loops through form datasources and tries to set them all to InMemory withouth checking first if they are TempDB or not.

In order to avoid this error, you can use the following construction:

if (!myTable.isTempDb())
{
myTable.setTmp();
}
More about TempDB tables on MSDN.


Источник: http://sashanazarov.blogspot.com/201...-inactive.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.