on 2023 Nov 10 5:12 AM
Hi
I am using the power designer 16.7. The data model database is Teradata 14.x . In the model for each varchar or char column the character set need to be defined. The current Character is set to LATIN or Null . I want to set all column to UNICODE using VBA script. I was looking for the character set property on column object in meta model I can find "character Case" at column object level , but could not find character set property. The code will be something similar as below. I want to know which column property i need to set for setting Character set to "UNOCODE" using VBA.
For Each col In tb.Columns
if col.datatype="CHAR" then
col.<<<<Characterset>>>> = "UNICODE"
Next
Thanks a lot
Ani
Hi Ani,
there is much easier way to do batch changes of such kind. Here is a simple 3-step procedure, that will help you achieve your goal.
However, if you still need that modification done by script, you should do it like this:
For each col in tb.Columns
If col.DataType = "CHAR" then
col.SetExtendedAttribute "CharacterSet", "UNICODE"
End if
Next
CharacterSet is not standard attribute. It is extended attribute and it has be handled differently.
Among other things, we are providing PowerDesigner trainings (from basic data modeling up to advanced customization and scripting), so if you happen to be interested, you can find me on LinkedIn. I have more than 15 years of experience with PD from various project and I`ll be happy to share my knowledge.
Kind Regards,
Ondrej Divis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ondrej Divis
Thanks a lot for providing the answers. I tried both the options and found both are working.
Appreciate your help
Ani
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
79 | |
11 | |
10 | |
10 | |
10 | |
8 | |
7 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.