Powerdesigner数据库反向生成PDM显示中文-创新互联

Tools->Execute Commands->Edit/Runscript…

网站建设哪家好,找成都创新互联!专注于网页设计、网站建设、微信开发、微信小程序、集团企业网站建设等服务项目。为回馈新老客户创新互联还提供了江城免费建站欢迎大家使用!

执行以下脚本,在Powerdesigner从数据库反向生成PDM时,NAME显示中文。

Option Explicit

ValidationMode = True

InteractiveMode = im_Batch

Dim 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 tab.comment ="" then

else

tab.name=tab.name+"("+tab.comment+")"

on error resume next

end if

Dim col ' running column

for each col in tab.columns

if col.comment="" then

' MsgBox "表"+tab.name+"列"+col.name +"没有comment"

else

col.name=col.name+"("+col.comment+")"

on error resume next

end if

next

end if

next

Dim view 'running view

for each view in folder.Views

if not view.isShortcut then

if view.comment="" then

MsgBox "视图"+view.name  +"没有comment"

else

view.name=view.name+"("+view.comment+")"

on error resume next

end if

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

另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


当前标题:Powerdesigner数据库反向生成PDM显示中文-创新互联
本文URL:http://ybzwz.com/article/depgpp.html