- 浏览: 3481749 次
- 性别:
- 来自: 北京
-
文章分类
最新评论
-
wanglf1207:
EJB的确是个不错的产品,只是因为用起来有点门槛,招来太多人吐 ...
weblogic-ejb-jar.xml的元素解析 -
qwfys200:
总结的不错。
Spring Web Flow 2.0 入门 -
u011577913:
u011577913 写道也能给我发一份翻译文档? 邮件437 ...
Hazelcast 参考文档-4 -
u011577913:
也能给我发一份翻译文档?
Hazelcast 参考文档-4 -
songzj001:
DbUnit入门实战
在使用PowerDesigner对数据库进行概念模型和物理模型设计时,一般在NAME或Comment中写中文,在Code中写英文。Name用来显 示,Code在代码中使用,但Comment中的文字会保存到数据库Table或Column的Comment中,当Name已经存在的时候,再写一次 Comment很麻烦,可以使用以下代码来解决这个问题:
- 代码一:将Name中的字符COPY至Comment中
'******************************************************************************
'* File: name2comment.vbs
'* Purpose: Database generation cannot use object names anymore
' in version 7 and above.
' It always uses the object codes.
'
' In case the object codes are not aligned with your
' object names in your model, this script will copy
' the object Name onto the object Comment for
' the Tables and Columns.
'
'* Title:
'* Version: 1.0
'* Company: Sybase Inc.
'******************************************************************************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
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
--------------------------------------------
另外在使用REVERSE ENGINEER从数据库反向生成PDM的时候,PDM中的表的NAME和CODE事实上都是CODE,为了把NAME替换为数据库中Table或Column的中文Comment,可以使用以下脚本:
- 代码二:将Comment中的字符COPY至Name中
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 IfPrivate sub ProcessFolder(folder)
On Error Resume Next
Dim Tab 'running table
for each Tab in folder.tables
if not tab.isShortcut then
tab.name = tab.comment
Dim col ' running column
for each col in tab.columns
if col.comment="" then
else
col.name= col.comment
end if
next
end if
nextDim view 'running view
for each view in folder.Views
if not view.isShortcut then
view.name = view.comment
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
-----------------------------------------------------------------------
以上两段代码都是VB脚本,在PowerDesigner中使用方法为:
PowerDesigner->Tools->Execute Commands->Edit/Run Scripts
将代码Copy进去执行就可以了,是对整个CDM或PDM进行操作
发表评论
-
oracle复制表数据,复制表结构
2011-07-25 21:19 361561.不同用户之间的表数据复制 对于在一个数据库上的两个 ... -
删除 SQL Server 的所有已知实例
2011-04-05 18:42 2013如果提示实例已经被注册,无法安装,那么: 删除 SQL ... -
【SQL】安装 SQL SERVER MsiGetProductInfo 无法检索 Product Code 1605错误 解决方案
2011-04-05 17:10 4818重装数据库服务器上的SQL SERVER 2008 上遇到了以 ... -
Mysql Using Master/Slave Replication with ReplicationConnection
2011-03-24 15:19 1966Starting with Connector/J 3.1.7 ... -
oracle网络配置listener.ora、sqlnet.ora、tnsnames.ora
2010-12-03 12:36 33312oracle网络配置 三个配置文件 listener.ora ... -
Oracle XE的数据库创建过程
2010-12-02 22:55 4305今天安装了Oracle XE,发现并没有自动创建数据库。趁着 ... -
实现数据库TPC性能测试的开源及商业软件
2010-12-02 01:11 3107商业软件 Benchmark Factory ... -
MySQL压力测试工具mysqlslap
2010-11-07 17:13 1747MySQL从5.1.4版开始带有一个压力测试工具mys ... -
一台机器上安装多个mysqld实例
2010-11-06 16:09 2147一台机器安装多个mysqld实例 1. ps -aux | ... -
MySQL数据库双向同步
2010-08-25 20:23 40401. 主从关系的同步 master端 192.168.5 ... -
MySQL 数据库之间的同步(windows与linux)
2010-08-25 20:14 31751.导出windows mysql的test库到linux m ... -
Ubuntu Server 下开启远程连接 MySQL
2010-03-16 23:24 3087要通过远程连接MySQL,需要做两步:第一步是要创建一个可以远 ... -
DB2 在REDHAT 5下的详细安装过程 DB2 9.5 C EXPRESS
2010-03-02 10:43 4551过详细测试并且补充后发表, 括号内的为自行添加的内容. ... -
IBM DB2 Express-C 9.5.2
2010-03-02 09:44 3485或许您已经知 ... -
Oracle Database 10g Express Edition安装小结
2010-03-01 15:28 9146racle Database 10g Express Edit ... -
HA JDBC – High Availability JDBC
2010-02-27 18:46 3286Some time ago I worked on a pr ... -
数据归档将走向何方
2010-02-25 11:50 2249数据量的爆炸性增长,让我们不得不更加关心存储。这也造成 ... -
Database
2010-02-18 15:53 2297下一代数据库发展的4大趋势 趋势之一:对XML的支 ... -
免安装Oracle运行pl/sql developer
2010-02-16 20:27 2170Sql客户端中,虽然最便捷的是万能而且轻量无比的Sql Wor ... -
在debian上安装oracle 10g express
2010-02-16 18:46 4897在debian上安装oracle 10g express 若 ...
相关推荐
PD194E-9HY系列液晶多功能谐波表用户手册
"PD画E-R图" PD画E-R图是概念数据模型的设计和实现方法,它使用实体-联系(Entity-RelationShip,简称E-R)理论作为基础,并对其进行了扩充。概念数据模型是现实世界中数据特征的抽象,应该满足三个方面的要求:...
PD194Z-9SD+用户手册
经典雷达资料-第17章脉冲多普勒(PD)雷达-4.docx经典雷达资料-第17章脉冲多普勒(PD)雷达-4.docx经典雷达资料-第17章脉冲多普勒(PD)雷达-4.docx经典雷达资料-第17章脉冲多普勒(PD)雷达-4.docx经典雷达资料-第17章脉冲...
PD194E-2S4多功能电力仪表 PD194E-9S4多功能电力仪表 PD194E-3S4多功能电力仪表 PD194E-AS4多功能电力仪表
(整理)经典雷达资料-第17章脉冲多普勒(PD)雷达-3.docx(整理)经典雷达资料-第17章脉冲多普勒(PD)雷达-3.docx(整理)经典雷达资料-第17章脉冲多普勒(PD)雷达-3.docx(整理)经典雷达资料-第17章脉冲多普勒(PD)雷达-3.docx...
USB-PD 是由 USB-IF 组织制定的一种快速充电规范,是目前主流的快充协议之一。 USB-PD 快充协议是以 Type-C 接口输出的,但不能说有 Type-C 接口就一定支持 USB-PD 协议快充。
光源控制器说明 M_PD3-10024-8-EI(A)_e.pdf 联接8个光源 可调式亮度 可以IO控制 可以网络控制
Parallel18无限期启动器
IEC/PD-CLC-TR-50427-2004很难找到的标准
佳能打印机ip1188驱动
夏普 Sharp vl-pd3s、vl-pd3h、vl-pd3e摄像机维修服务说明书原理图PCB图
PD-ISO-PAS-21448_SOTIF-2019.zip
PD-CLC-TR-50126-3:2008 Railvvay applications - The specification
PD-14-项目进度计划表(甘特图)
USB_PD_R3_0 V1.1 20170112
PD-60-24是深圳市普德新星电源技术有限公司生产的一款铁壳小型工控电源,属于POWERLD系列。该电源专为工业应用设计,具有小巧的体积,高效能以及高可靠性。它能够提供稳定的24V直流电压输出,适用于各种严苛的工业...
资源来自pypi官网。 资源全名:pd-buddy-python-0.4.0.tar.gz
powerDesigner 把name项添加到comment 使用方法使用方法 PowerDesigner->Tools->Execute Commands->Edit/Run Scripts 可以保存该脚本为:name2comment.vbs
花了大半天,汉化了这个软件的一部分,今后后继续更新力争汉化完全。 使用方法: 将所有文件复制到PowerDesigner15的安装目录覆盖原来的文件,建议覆盖前做好原文件的备份。