To guarantee referential integrity, the Baan/LN Database stores reference counters, which indicate how many times a record is used in a parent child relation. Since baan/LN can store each data in a several different database, we can not use the referential integrity mechanisms of the database itself. The field Refcntd stores the number of delete constraints to a record, the Refcntu stores the number of update constraints to a record.These fields are automatically added to each Baan table so you do not have to add them manually.
Only if the reference counter is zero, can the parent record be deleted. Reference counters are only applicable if the Referential Control Delete Mode (refcntd) or Referential Control Update Mode (refcntu) in the relation is “Restricted (with counter)”.
除了截图,我还附上一些代码,是通过Where Used Table Field 找到所有tcmcs032.edat的使用清单,逐个检查代码后找到的一个最简单的应用例子。估计能看此文看到这里的人都能看得懂:
function get.sing.tax()
{
select tcmcs032.*
from tcmcs032
where tcmcs032._index1 = {:tcmcs036.ccty, :tcmcs036.cvat}
order by tcmcs032._index1 desc
as set with 1 rows
selectdo
tax.rate = tcmcs032.pvat
selectempty
tax.rate = 0
endselect
}