如果手上只有PDM,..想要產生 meta data table
Tools >> powerbuilder >>Generate Extended Attributes...
當然要先匯入powerbuilder extension,
Tool >>Extension >>Import an Extension,勾選powerbuilder
同時先準備好五個meta data table schema, 欄位名稱不能更改,但字串欄型態可加長.
CREATE TABLE [dbo].[pbcatcol](
[pbc_tnam] [char](30) NOT NULL,
[pbc_tid] [int] NULL,
[pbc_ownr] [char](30) NULL,
[pbc_cnam] [char](30) NOT NULL,
[pbc_cid] [smallint] NULL,
[pbc_labl] [nvarchar](254) NULL,
[pbc_lpos] [smallint] NULL,
[pbc_hdr] [nvarchar](254) NULL,
[pbc_hpos] [smallint] NULL,
[pbc_jtfy] [smallint] NULL,
[pbc_mask] [nvarchar](31) NULL,
[pbc_case] [smallint] NULL,
[pbc_hght] [smallint] NULL,
[pbc_wdth] [smallint] NULL,
[pbc_ptrn] [nvarchar](31) NULL,
[pbc_bmap] [char](1) NULL,
[pbc_init] [nvarchar](254) NULL,
[pbc_cmnt] [nvarchar](4000) NULL,
[pbc_edit] [nvarchar](31) NULL,
[pbc_tag] [nvarchar](254) NULL,
CONSTRAINT [PK_pbcatcol] PRIMARY KEY CLUSTERED
(
[pbc_tnam] ASC,
[pbc_cnam] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[pbcatedt](
[pbe_name] [nvarchar](30) NOT NULL,
[pbe_edit] [nvarchar](254) NULL,
[pbe_type] [smallint] NOT NULL,
[pbe_cntr] [int] NULL,
[pbe_seqn] [smallint] NOT NULL,
[pbe_flag] [int] NULL,
[pbe_work] [char](32) NULL,
CONSTRAINT [PK_pbcatedt] PRIMARY KEY CLUSTERED
(
[pbe_name] ASC,
[pbe_seqn] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[pbcattbl](
[pbt_tnam] [char](30) NOT NULL,
[pbt_tid] [int] NULL,
[pbt_ownr] [char](30) NULL,
[pbd_fhgt] [smallint] NULL,
[pbd_fwgt] [smallint] NULL,
[pbd_fitl] [char](1) NULL,
[pbd_funl] [char](1) NULL,
[pbd_fchr] [smallint] NULL,
[pbd_fptc] [smallint] NULL,
[pbd_ffce] [char](32) NULL,
[pbh_fhgt] [smallint] NULL,
[pbh_fwgt] [smallint] NULL,
[pbh_fitl] [char](1) NULL,
[pbh_funl] [char](1) NULL,
[pbh_fchr] [smallint] NULL,
[pbh_fptc] [smallint] NULL,
[pbh_ffce] [char](32) NULL,
[pbl_fhgt] [smallint] NULL,
[pbl_fwgt] [smallint] NULL,
[pbl_fitl] [char](1) NULL,
[pbl_funl] [char](1) NULL,
[pbl_fchr] [smallint] NULL,
[pbl_fptc] [smallint] NULL,
[pbl_ffce] [char](32) NULL,
[pbt_cmnt] [nvarchar](4000) NULL,
CONSTRAINT [PK_pbcattbl] PRIMARY KEY CLUSTERED
(
[pbt_tnam] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[pbcatvld](
[pbv_name] [nvarchar](30) NOT NULL,
[pbv_vald] [nvarchar](254) NOT NULL,
[pbv_type] [smallint] NOT NULL,
[pbv_cntr] [int] NULL,
[pbv_msg] [nvarchar](254) NULL,
CONSTRAINT [PK_pbcatvld] PRIMARY KEY CLUSTERED
(
[pbv_name] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
轉出過程中, 其實PD會產生insert 及update 語法, 所以上述五個table應設立PK或Unique Index,以避免重覆轉入
若手動修改了五個table的內容想要反向更新PDM時,則
Tools >> powerbuilder >>Reverse Engineering Extended Attributes...就轉回來了.
訂閱:
張貼留言 (Atom)
自動記錄滑鼠點選操作
為了一個需求,需要人工去點選幾個滑鼠的點選行為,找了幾種工具,覺得GS Auto Clicker最實用,極符合我的需求,尤其是多個固定位置的button點擊,解決了一個很耗時間的工作。 最後設定完預設hotkey F8為啟用鍵,就可以開始自動做工了。再按F8結束工作。 GS Au...
-
上網找了免費的白箱檢測工具,找到了 puma scan 因為支援OWASP TOP 10的檢測,所以這是一個符合客戶需求又能與Visual studio結合的工具(白話說...交差了事矣....) 更重要的是這不用錢....檢測工具都貴森森的,尤其是源碼檢測工具。 ht...
-
建了一個工作排程,定時執行batch檔。 batch中寫了一段xcopy,主要針對有異動較新檔案時才複製。 echo off for /f "delims=" %%a in ('wmic OS Get localdatetime ^| find...
-
改用SQL Server Management Studio 2017有一段時間了。 在執行一段之前寫的SQL要組出一段語法時,里頭包含了使用CHAR(10)當作換行符號的文字,在輸出結果中,使用複製貼上的方式要進行執行時,發現換行符號都失效了。 但如果使用Results...
沒有留言:
張貼留言