cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Dropping a column from table using VB script in Powerdesigner

former_member699267
Discoverer
0 Likes
631

Hi,

Anyone help me with script for dropping a column using vbscript in Powerdesigner? i used the following code snippet but it is throwing Object does not support

Dim mdl ' the current model Set mdl = ActiveModel If (mdl Is Nothing) Then
MsgBox "There is no Active Model"
ElseIf Not mdl.IsKindOf(PdPDM.cls_Model) Then
MsgBox "The Active Model is not a PDM."
else
Dim fldr, tab
Set fldr = ActiveDiagram.Parent
For Each tab In fldr.children

if tab.ObjectType = "Table" then
flag = false
for each col in tab.columns
if left(col.code,1) = "_" then
col.remove
end if
next
end if
next
end if

Accepted Solutions (0)

Answers (1)

Answers (1)

arnaud_laurent
Product and Topic Expert
Product and Topic Expert
0 Likes

Hello,

Try col.delete.

HTH