SQL生成PDM,PDM转中文

SQL生成PDM,PDM转中文_第1张图片

SQL生成PDM,PDM转中文_第2张图片

SQL生成PDM,PDM转中文_第3张图片

SQL生成PDM,PDM转中文_第4张图片

SQL生成PDM,PDM转中文_第5张图片

转中文执行以下两个脚本,若未转成功,请检查SQL编码:

Option   Explicit 
ValidationMode   =   True 
InteractiveMode   =   im_Batch 

Dim   mdl   

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 


Private   sub   ProcessFolder(folder)    
      Dim   Tab   
      for   each   Tab   in   folder.tables    
            if   not   tab.isShortcut then
                     if  trim(tab.comment)="" then
                        tab.comment   =   tab.name
                     end if  
                  Dim   col   
                  for   each   col   in   tab.columns   
                        if trim(col.comment)="" then 
                           col.comment=   col.name   
                        end if 
                  next    
            end   if    
      next    
  
      Dim   view  
      for   each   view   in   folder.Views    
            if   not   view.isShortcut and trim(view.comment)=""  then    
                  view.comment   =   view.name    
            end   if    
      next    
  

      Dim   f      
      For   Each   f   In   folder.Packages    
            if   not   f.IsShortcut   then    
                  ProcessFolder   f    
            end   if    
      Next    
end   sub

Option   Explicit    
ValidationMode   =   True    
InteractiveMode   =   im_Batch    
  
Dim   mdl      
  
  
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    
  
Private   sub   ProcessFolder(folder)    
On Error Resume Next   
      Dim   Tab   
      for   each   Tab   in   folder.tables    
            if   not   tab.isShortcut   then    
                  tab.name   =   tab.comment   
                  Dim   col     
                  for   each   col   in   tab.columns    
                  if col.comment="" then   
                  else  
                        col.name=   col.comment    
                  end if  
                  next    
            end   if    
      next    
  
      Dim   view      
      for   each   view   in   folder.Views    
            if   not   view.isShortcut   then    
                  view.name   =   view.comment    
            end   if    
      next    
  

      Dim   f     
      For   Each   f   In   folder.Packages    
            if   not   f.IsShortcut   then    
                  ProcessFolder   f    
            end   if    
      Next    
end   sub

 

你可能感兴趣的:(PDM,开发,数据库,sql,数据库,database)