第十二章 The Database layer
1.更改RecVersion
AX4.0使用了乐观并发控制,RecVersion是用来标识记录版本的。
Inside Dynamics Axapta源代码赏析(五)static void RecVersionChange(Args _args)
}

2.跳过ForUpdate和TTSbegin,TTSCommit的检查.
Inside Dynamics Axapta源代码赏析(五) CustTable custTable;
Inside Dynamics Axapta源代码赏析(五)    ;
Inside Dynamics Axapta源代码赏析(五)    ttsbegin;
Inside Dynamics Axapta源代码赏析(五)    select custTable where custTable.AccountNum 
== '4000';
Inside Dynamics Axapta源代码赏析(五)    custTable.CreditMax 
= 1000;
Inside Dynamics Axapta源代码赏析(五)
Inside Dynamics Axapta源代码赏析(五)    custTable.skipTTSCheck(
true);
Inside Dynamics Axapta源代码赏析(五)    custTable.update();
Inside Dynamics Axapta源代码赏析(五)    ttscommit;
这样是可以跳过,但为什么要跳过那?
3.临时表的使用.
通过setTmp和data两个方法可以搞定.
Inside Dynamics Axapta源代码赏析(五)static void TmpCustTable(Args _args)

Table有两个方法,data()和setTmpData(),其中Data()是拷贝一份数据,而setTmpData()只是对象引用的传递.
4.临时表的清空
把临时表赋值为null的时候,内存被清空,临时文件被删除

Inside Dynamics Axapta源代码赏析(五)static void TmpLedgerTable(Args _args)
}

5.下面的这段代码正好印证了前面的说法,setTmpData是指向同一个对象的.

Inside Dynamics Axapta源代码赏析(五)static void TmpLedgerTable(Args _args)
}

6.ttsabort用于忽略记录的更改或插入.
剩下的代码都是一些关于事务和锁的问题,跟数据库的理论类似,这里就不摘录了.


 

相关文章:

  • 2021-10-14
  • 2022-02-22
  • 2022-12-23
  • 2021-08-27
  • 2021-05-22
  • 2021-11-01
  • 2021-10-05
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-10
相关资源
相似解决方案