PowerDesigner中在生成的数据库脚本中用name列替换comment列作为字段描述的方法
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                PowerDesigner中在生成的数据库脚本中用name列替换comment列作为字段描述的方法
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.                        
                                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 sub2 PowerDesigner的數據庫逆向工程將中將comment列腳本賦值到name列
 打開Tools – Execute Commands – Run Script,運行以下腳本:
總結
以上是生活随笔為你收集整理的PowerDesigner中在生成的数据库脚本中用name列替换comment列作为字段描述的方法的全部內容,希望文章能夠幫你解決所遇到的問題。
                            
                        - 上一篇: Docker笔记整理
 - 下一篇: Java字节码技术