Forum Discussion

bduncan's avatar
bduncan
Contributor
13 years ago

DBTables Iteration

Hi,



Is there a way to iterate through the DBTables collection (VB Script) and read the Name property of the DBTable elements contained in it?  There doesn't seem to be an index property or item property that can be used.





Thanks

William Duncan

2 Replies

  • Hello William,



    Here is how you can do this:

    Dim tables 

    Dim table 

    Dim tableName 

    Set tables = aqObject.GetProperties(DBTables) 

    While tables.HasNext 

      Set table = tables.Next 

      tableName = table.Name 

      Log.Message(tableName) 

    WEnd
  • Thank you so much, I did not even think about looking at aqObject even though I use Program Objects for many other things.





    William Duncan