zoukankan
html css js c++ java
获取AX数据字典
AX提供了很多反射类可以获取元数据信息,刚刚一个同事需要一个AX数据字典的列表,顺手写了一个,没啥技术含量,在这里做个备份,以便以后复制粘贴.
static
void
DataDictionary(Args _args)
{
#AOT
#define
.FileName(@"d:\DataDictionary.txt")
TextBuffer tb
=
new
TextBuffer();
TreeNode treeNode
=
TreeNode::findNode(#TablesPath);
DictTable dictTable;
DictField dictField;
int
i;
;
treeNode
=
treeNode.AOTfirstChild();
while
(treeNode)
{
dictTable
=
new
DictTable(tableName2Id(treeNode.AOTname()));
tb.appendText(dictTable.name()
+
'
'
+
dictTable.label());
tb.appendText(
'
\n
'
);
for
(i
=
1
;i
<=
dictTable.fieldCnt();i
++
)
{
dictField
=
new
DictField(dictTable.id(),dictTable.fieldCnt2Id(i));
tb.appendText(
'
'
+
dictField.name()
+
'
'
+
dictField.label());
tb.appendText(
'
\n
'
);
}
print treeNode.AOTname();
treeNode
=
treeNode.AOTnextSibling();
}
tb.toFile(#FileName);
}
当然也可以不用TreeNode,而用Dictionary得到表.
static
void
DataDictionary2(Args _args)
{
#AOT
#define
.FileName(@"d:\DataDictionary.txt")
TextBuffer tb
=
new
TextBuffer();
Dictionary dictionary
=
new
Dictionary();
DictTable dictTable;
DictField dictField;
int
i;
int
j;
;
for
( i
=
1
;i
<=
dictionary.tableCnt();i
++
)
{
dictTable
=
new
DictTable(dictionary.tableCnt2Id(i));
tb.appendText(dictTable.name()
+
'
'
+
dictTable.label());
tb.appendText(
'
\n
'
);
for
(j
=
1
;j
<=
dictTable.fieldCnt();j
++
)
{
dictField
=
new
DictField(dictTable.id(),dictTable.fieldCnt2Id(j));
tb.appendText(
'
'
+
dictField.name()
+
'
'
+
dictField.label());
tb.appendText(
'
\n
'
);
}
print dictTable.name();
//
treeNode = treeNode.AOTnextSibling();
}
tb.toFile(#FileName);
}
查看全文
相关阅读:
VS2019远程调试
windows下使用redis-desktop-manager远程连接redis失败问题
无法打开到SQL Server的连接 (Microsoft SQL Server, 错误:53) .
由于管理员设置的策略,该磁盘处于脱机状态
window下ping端口tcping
dos命令远程登陆window server服务器并重启
大二寒假作业之Android
大二寒假作业之Android
大二寒假作业之Android
大二寒假作业之JavaWeb
原文地址:https://www.cnblogs.com/Farseer1215/p/981148.html
最新文章
Javaweb学习12.17
Javaweb学习12.16
Javaweb学习12.13
Javaweb学习12.11
Javaweb学习12.10
Javaweb学习12.9
Javaweb学习12.8
Javaweb学习12.7
requests上传文件的方法
使用requests.session()获取不到cookie怎么办?
热门文章
转载:凸集的性质及其应用
win10:限制某一程序内存
希腊字母发音对照表
技巧:右键菜单添加“新建文件”
转贴:多目标进化算法的性能指标总结 (一)
技巧
辨析:犹太教、基督教、伊斯兰教
In praise of bogs, swamps, and marshes
概念(机器学习):有监督、无监督、半监督学习
Pycharm 提示 your activation code could not be validated error 1653219
Copyright © 2011-2022 走看看