前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Infor ERP LN的数据表里的两个隐藏字段:T$REFCNTD和T$REFCNTU

Infor ERP LN的数据表里的两个隐藏字段:T$REFCNTD和T$REFCNTU

作者头像
崔文远TroyCui
发布2021-02-23 09:55:37
9890
发布2021-02-23 09:55:37
举报
文章被收录于专栏:远在上海

拿Item General Data的Table – tcibd001举例,如果你在数据库里直接查询,你会看到两个字段:TREFCNTD和T REFCNTU,图示如下:

但是,如果从LN里面的ttaad4500看表结构,你是看不到的。

这两个字段有什么用呢?

refcntd – Referential Control Delete Mode

refcntu – Referential Control Update Mode

字段Refcntd存储一条记录的删除约束的数量

字段Refcntu存储一条记录的更新约束的数量。

只要通过Tools模块新增的表,这两个字段会自动添加到每个Baan/LN表中,您不必手动添加它们。

以下来自官方的介绍:

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)”.

为什么要说这个呢

重点来了,有时候,你需要从外部程序往Baan/LN的表写记录,那么就得考虑给这两个字段赋值的问题了。

别忘了在你的语句中增加这两个字段,比如:(TREFCNTD,T REFCNTU) VALUES (0,0)

至于为啥赋值为零,我这个新表其实没啥关联的表,那么都默认为0了。

好了,春节将至,特以此文收官祝广大Infor ERP LN/Baan战友们2021牛年大吉大利、身体健康、万事如意!

相关主题

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2021年2月5日,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 相关主题
相关产品与服务
数据库
云数据库为企业提供了完善的关系型数据库、非关系型数据库、分析型数据库和数据库生态工具。您可以通过产品选择和组合搭建,轻松实现高可靠、高可用性、高性能等数据库需求。云数据库服务也可大幅减少您的运维工作量,更专注于业务发展,让企业一站式享受数据上云及分布式架构的技术红利!
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档