Results 1 to 2 of 2

Thread: Newbie question

  1. #1
    Junior Member
    Join Date
    Jun 2010

    Default Newbie question

    I need to create a list of all objects stored in a STS database.
    For each object i need to get only object type and dimesion.

    Thanks in advance.

  2. #2


    You can iterate the scheme-table in the storage engine and get the type of all tables stored in the database:

        using (StorageEngine engine = StorageEngine.FromFile(databaseFile))
            foreach (Row<Locator, SchemeRecord> kv in engine.Scheme)
    From the table type you can get key type and the record type of the rows stored in it:
        foreach (Row<Locator, SchemeRecord> row in engine.Scheme)
            Type tableType = row.Record.Type; //XTable<TKey, TRecord>
            Type keyType = tableType.GetGenericArguments()[0];
            Type recordType = tableType.GetGenericArguments()[1];
    If you want to get the size of each object, you should read the relevant table.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
2002 - 2014 STS Soft SC. All Rights reserved.
STSdb, Waterfall Tree and WTree are registered trademarks of STS Soft SC.