How to change the column data type in PowerDesigner by VB script? I am trying to change the datatype globally in the model from varchar to varbinary, but I am unable to do it with the help with VB script.
Asked
Active
Viewed 1,164 times
0
-
What do you mean by "change globally"? – pascal Oct 02 '14 at 12:56
1 Answers
0
You should provide an example of code which does not work.
Here is an example which works, and creates a Column with data type varbinary:
option explicit
dim mdl : set mdl = activemodel
dim tbl : set tbl = mdl.tables.createnew
dim col : set col = tbl.columns.createnew
col.datatype = "varbinary"
Regardless of VBScript, if you want to change the data type of several columns, you'd better use a Domain:
option explicit
dim mdl : set mdl = activemodel
dim tbl : set tbl = mdl.tables.createnew
dim dom : set dom = mdl.domains.createnew
dim col : set col = tbl.columns.createnew
set col.domain = dom
dom.datatype = "varbinary"

pascal
- 3,287
- 1
- 17
- 35