How can we reverse the value of the pbc_labl field of pbcatcol in the database to the name corresponding to PDM?

Source: Internet
Author: User
Powerdesigner can write the name value of PDM to the corresponding fields in the pbcatcol table of the database, but now I use the resever engineer function of PD to reverse the database table to PDM, how can we reverse the name value generated in pbcatcol to the name of PDM at the same time (I want to be Chinese ).
Thank you! Reply to: Don't Give Up (byfq) 2004-12-2 12: 36: 37powerdesigner Database System Analysis Design and Application written in Jiang, a bit complicated and hard to remember, you can find the reply: A Fei (nbnasom) 14:37:37 study ing reply: [last drop of water] (am2000) 22: 33: 52tools-powerbuilder-reverse extended attributes reply: [last drop of water] (am2000) 23:33:48 I also encountered this problem.
I have used reverse engineering to reverse the labels, headers, and comments in the database to the extended attributes of PDM.
But I don't know how to assign a label to name. Reply to: [last drop of water] (am2000) 2004-12-4 23: 45: 44 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 ls_nametemp
Dim tab 'running table
For each tab in folder. Tables
If not tab. isw.cut then
'Tab. Code = tab. Name

If instr (Tab. Name, "")> 0 then
Ls_nametemp = mid (Tab. Name, 1, instr (Tab. Name, "")-1)
Else
If instr (Tab. Name, "")> 0 then
Ls_nametemp = mid (Tab. Name, 1, instr (Tab. Name, "")-1)
Else
Ls_nametemp = tab. Name
End if
End if

If Len (ls_nametemp) <8 then
Tab. Name = ls_nametemp + space (8-len (ls_nametemp) + TAB. Code
Else
Tab. Name = ls_nametemp + space (2) + TAB. Code
'Exceptions with the same name are considered
End if
On Error resume next

Dim Col 'running Column
For each Col in tab. Columns
'Col. Code = col. Name
If instr (Col. Name, "")> 0 then
Ls_nametemp = mid (Col. Name, 1, instr (Col. Name, "")-1)
Else
If instr (Col. Name, "")> 0 then
Ls_nametemp = mid (Col. Name, 1, instr (Col. Name, "")-1)
Else
Ls_nametemp = col. Name
End if
End if

If Len (ls_nametemp) <6 then
'Col. Name = ls_nametemp + space (8-len (ls_nametemp) * 2) + col. Code
Col. Name = ls_nametemp + Left ("", 6-len (ls_nametemp) + col. Code
Else
'Col. Name = ls_nametemp + space (2) + col. Code
Col. Name = ls_nametemp + Left ("", 1) + col. Code

'Exceptions with the same name are considered
End if
On Error resume next

Next
End if
Next
Dim view 'running View
For each view in folder. Views
If not view. isw.cut then
'View. Code = view. Name

If instr (view. Name, "")> 0 then
Ls_nametemp = mid (view. Name, 1, instr (view. Name, "")-1)
Else
If instr (view. Name, "")> 0 then
Ls_nametemp = mid (view. Name, 1, instr (view. Name, "")-1)
Else
Ls_nametemp = view. Name
End if
End if

If Len (ls_nametemp) <8 then
View. Name = ls_nametemp + space (8-len (ls_nametemp) + view. Code
Else
View. Name = ls_nametemp + space (2) + view. Code
'Exceptions with the same name are considered
End if
On Error resume next

End if
Next
'Go into the sub-packages
Dim f'running folder
For each F in folder. Packages
If not F. isw.cut then
Processfolder F
End if
Next
End sub

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.