1 PowerDesigner中在生成的数据库脚本中用name列替换comment列作为字段描述的方法如下,

依次打开Tools – Execute Commands – Run Script,运行以下脚本:

Option Explicit
ValidationMode = True
InteractiveMode = im_BatchDim mdl 'the current model'get the current active model
Set mdl = ActiveModel
If (mdl Is Nothing) Then
MsgBox "There is no current Model"
ElseIf Not mdl.IsKindOf(PdPDM.cls_Model) Then
MsgBox "The current model is not an Physical Data model."
Else
ProcessFolder mdl
End If'This routine copy name into code for each table, each column and each view
'of the current folder
Private sub ProcessFolder(folder)
Dim Tab 'running table
for each Tab in folder.tables
if not tab.isShortcut then
tab.comment = tab.name
Dim col 'running column
for each col in tab.columns
col.comment= col.name
next
end if
nextDim view 'running view
for each view in folder.Views
if not view.isShortcut then
view.comment = view.name
end if
next'go into the sub-packages
Dim f 'running folder
For Each f In folder.Packages
if not f.IsShortcut then
ProcessFolder f
end if
Next
end sub

2 PowerDesigner的数据库逆向工程将中将comment列脚本赋值到name列
打开Tools – Execute Commands – Run Script,运行以下脚本:

Option Explicit
ValidationMode = True
InteractiveMode = im_BatchDim mdl 'the current model'get the current active model
Set mdl = ActiveModel
If (mdl Is Nothing) Then
MsgBox "There is no current Model"
ElseIf Not mdl.IsKindOf(PdPDM.cls_Model) Then
MsgBox "The current model is not an Physical Data model."
Else
ProcessFolder mdl
End If'This routine copy name into code for each table, each column and each view
'of the current folder
Private sub ProcessFolder(folder)Dim Tab 'running table
for each Tab in folder.tables
if not tab.isShortcut then
if len(tab.comment) <> 0 then
tab.name = tab.comment
end if
On Error Resume Next
Dim col 'running column
for each col in tab.columns
if len(col.comment) <>0 then
col.name =col.comment
end if
On Error Resume Next
next
end if
next
end sub

PowerDesigner中在生成的数据库脚本中用name列替换comment列作为字段描述的方法相关推荐

  1. 根据Word表格自动生成SQL数据库脚本的VBScript代码

    这是几年前写的根据Word表格自动生成SQL数据库脚本的VBScript代码,最近修改了下(原来只支持单个Word表格)使其支持一个Word文档中的多个表格,生成的SQL文件名以Word文件名+.SQ ...

  2. 在PowerDesigner中应用达梦数据库

    一.背景 在pd中,无法直接生成达梦数据库的建表语句,需要对pd进行一些配置调整,才能使生成的sql语句在达梦中执行.在本方法中,是通过修改ODBC3.0的相关配置,达到能生成适用于达梦数据库的建库脚 ...

  3. PowerDesigner 中SQL文件、数据库表反向生成PDM

    1      反向生成PDM 1)        创建一个空的PDM模型(选择对应的DBMS): 2)        选择[Database]--[Update Model from Database ...

  4. 生成的数据库脚本没有注释?

    1,选择Database->Generate Database 选中Generate name in empty comment就可以了 转载于:https://www.cnblogs.com/ ...

  5. 逆向工程mysql注释_PowerDesigner 15进行逆向工程生成数据库图表时,注释的comment的生成,解决PowerDesigner逆向工程没有列注释...

    使用PowerDesigner默认配置逆向工程是没有注释(name列为英文,comment列是空的),这样的不方便查看字段具体是什么意义,将注释一同导出,方便查看字段具体的意义,如下图 注释列导出步骤 ...

  6. 使用MySQL Workbench导出数据库脚本以及出错时的解决办法

    使用MySQL Workbench导出数据库脚本以及出错时的解决办法 正常做法 打开workbench,选择左上角的菜单栏,选择Server->Data 之后出现如下界面 一般情况下,这样就导出 ...

  7. 电脑表格日期怎么修改原有日期_如何在Excel表中自动生成记录数据的日期和时间...

    几天前有人问我: 在Excel表格中输入信息时,如何在日期单元格中自动生成日期和时间? 输入表格时,我们经常需要输入时间,而不是填写存储时间,为了减少输入工作量,您可以将日期设置为自动生成. 例如,当 ...

  8. 读取Java源文件中字段的注释当做Swagger的字段描述

    本文作者:suxingrui 本文链接:https://blog.csdn.net/suxingrui/article/details/103788530 版权声明:本文为原创文章,转载请注明出处. ...

  9. powerdesigner 生成数据库脚本

    PowerDesigner导出所有SQL脚本 操作:Database=>Generate Database PowerDesigner怎么导出建表sql脚本 1 按照数据库类型,切换数据库. D ...

最新文章

  1. 主成分分析(Principle Component Analysis)PCA的核心思想是什么?PCA算法的优缺点?增量PCA模型, 随机PCA, 模型、 核化PCA分别是什么?使用时如何选择?
  2. 利用高带宽无线代替电缆应用于脑机接口信号传输
  3. javascritp笔记1
  4. BLE Mesh(1)—— 简述
  5. SpringBoot中实现批量文件上传
  6. 剑指Offer——不用加减乘除做加法
  7. 【原】Coursera—Andrew Ng机器学习—课程笔记 Lecture 16—Recommender Systems 推荐系统...
  8. 计算机网络资料篇(一)——HTTP
  9. LeetCode-203:移除链表元素
  10. 两张照片重叠处半透明_那些悬浮在空中的照片是怎么拍的?
  11. android Fragment详解三:实现Fragment的界面
  12. 【Matlab学习笔记】【细胞或颗粒检测分割】资源汇总
  13. mysql物业管理系统设计_小区物业管理系统的设计与实现(IDEA,SSM,MySQL)
  14. 分享两套企业级进销存管理系统源码
  15. cacti监控linux和windows磁盘io,为CactiEZ(或者Cacti)增加监控磁盘IO功能
  16. [ASP调试]小旋风Web服务器使用
  17. Redis分布式锁----悲观锁实现,以秒杀系统为例 - 林炳文Evankaka的专栏 - CSDN博客
  18. Anaconda虚拟环境使用及包管理
  19. Katalon Studio:一款静候你使用的免费自动化测试工具
  20. 分清cols和rows,x与y,以及width和height的关系

热门文章

  1. CentOS7 安装NFS SSH免密码登陆
  2. ubuntu g++ 升级
  3. 斗鱼mac html5,New API · Issue #28 · spacemeowx2/DouyuHTML5Player · GitHub
  4. case 日期when 范围_多个日期段如何分组 case when convert等用法
  5. editorloop 占用_systemd CPU占用100%,并出现大量僵尸进程
  6. web前端知识点太多_web前端入门必学的16个知识点,都来看一下吧
  7. Android什么是函数,什么是函数响应式编程(JavaAndroid版本)
  8. linux可以ping通,Linux可以Ping通但不能traceroute
  9. r2游戏服务器网站,云服务器win2008r2玩游戏
  10. 7系列mrcc xilinx_XILINX 7系列FPGA_时钟篇