1

I would like to find column in tables. Why I have mistake when I run VBscript in Power Designer?

Dim table, column
for each table in activeModel.tables
for each column in table.columns
output column.name
next
next

Mistake is Object doesn't support this property or method: 'columns'.

Jan
  • 2,060
  • 2
  • 29
  • 34
monika01
  • 29
  • 2
  • 10
  • Maybe you're picking Shortcuts. You should display the `table` type, `output table.name&":"&table.classname`. – pascal May 09 '16 at 13:00
  • If it's the case, you can add a test like `if table.classkind = cls_table then` before looping on `table` columns. – pascal May 09 '16 at 13:03
  • thank you, I tried both, but it didnt work..`output table.name&":"&table.classname` just shows me name of tables but not name of columns. – monika01 May 09 '16 at 16:20
  • Displaying `table.classname` was to try to identify the kind of objects that the script finds in the `ActiveModel.Tables` collection, and which are not `Table`, to fix the `Object doesn't support this property or method: 'columns'` error. – pascal May 10 '16 at 07:10

0 Answers0