找传奇、传世资源到传世资源站!
VB编程 正文

PowerDesigner 将表的字段name属性设置到comment注释

  • 资源分类:VB编程
  • 发 布 人:房东的猫
  • 文件大小:1782
  • 文件格式:.vbs
  • 浏览次数:23
  • 下载次数: 0
  • 发布时间:9月5日

  • 标签: 源码例子
8.5玩家评分(1人评分)
下载后可评
介绍 评论 失效链接反馈

PowerDesigner 将表的字段name属性设置到comment注释 VB编程-第1张'******************************************************************************'* File: name2comment.vbs'* Title: Name to Comment Conversion'* Model: Physical Data Model'* Objects: Table, Column, View'* Author: steveguoshao'* Created: 2013-11-29'* Mod By: '* Modified: '* Version: 1.0'* Memo: Modify from name2code.vbs'******************************************************************************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 comment 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 next Dim 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

评论

发表评论必须先登陆, 您可以 登陆 或者 注册新账号 !


在线咨询: 问题反馈
客服QQ:174666394

有问题请留言,看到后及时答复