cancel
Showing results for 
Search instead for 
Did you mean: 

How to retrieve all views referencing a table by VBScript

Former Member
0 Kudos

Hello,

in the table and view dialogs you have the dependencies tab. There you get lists of all objects referenced by the current object and all objects referencing the current object.

With VBScript you can call the method "DependenciesText" to get a string block containing these information.

My problem is, that the execution of "DependenciesText" for all tables and all views takes a very long time and that the string block does not always contains the fully qualified objects but only object names without the owner. This is a problem, because we have multiple owners/schemas with same tables names in our models.

I guess that there must be a collection containing objects with these dependecy information.

Does anyone knows where this collection could be? Part of the model? Part of the table object?

Or does anyone knows a completely different but still good way? Or has an example?

Thank you.

Best regards,

Florian

Accepted Solutions (1)

Accepted Solutions (1)

marc_ledier
Active Participant
0 Kudos

Hi,

I may not have understood correctly, but browsing the Table.Views collection should do what I understood you want

<<

set M = ActiveModel

For each T in M.Tables

   output "table:" & T

   output "Views:"

   for each V in T.Views

      output "   " & V

   next

next

>>

Marc

Former Member
0 Kudos

Hi Marc,

thank you very much for the very quick and perfect answer. You helped me 100%

Best regards,

Florian

Answers (0)