Monday, July 8, 2013

How can I get list of tables in a table collection ?


    SysDictTableCollection  tableCollection;
    SysDictTable            SysDictTable;

    TableName               tableName;
    Str                             sqlTableName;
   
    ;
    tableCollection = new SysDictTableCollection("TableCollationName");
    tableName       = tableCollection.nextTable();
    while (tableName)
    {
        SysDictTable = New SysDictTable(tablename2id(tableName));
      
        sqlTableName = SysDictTable.name( DbBackend::Sql );
        If ( ! sqlTableName)
            Continue;
       
        Info ( tableName + " - " + sqlTableName );
       
        tableName = tableCollection.nextTable();
    }


Enjoy !

No comments: