Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

MetaDataManager init

edited June 2003 in General
RB7.02 D6 Dade EndUser

I have a dictionary with quite a number of tables and columns and it
takes a few seconds for the MetaDataManager to initialize. I would
like to get that out of the way on program load - where the user is
used to waiting - instead of on first use (which causes an
unidentified pause for the user).

How can I do this? At the point where I want to do it I have the
dictionary etc. but I don't have a report loaded (and may have one at
all yet).

Thanks,
Rick Matthews
Dartek Systems Inc.

Comments

  • edited June 2003
    Rick,

    There is a global MetaDataManager variable declared in the
    daMetaDataManager. Try calling gMetaDataManager.GetTables to initialize the
    MetaDataManager before its default initialization time. You will need to
    create your own TList and TdaBDESession components to pass the GetTables
    function. If you then need to retrieve the fields, you can loop through the
    list you created and call GetFields on each of the tables.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2003
    Thanks Nico, it was the need for a session component that stopped me
    from do that. Is there anything special I need to do/set when I
    create/destroy the component?

    Thanks,

  • edited June 2003
    Rick,

    Sorry for the delay. You should not have to do anything special when
    creating an empty TdaBDESession object. I will work on an example that
    should help you work through this. Thanks for your patience.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2003
    Thanks Nico I have now done it.

    However the reason I was doing this was to try to avoid a long pause
    when the metadata was created. It seems though that my real problem
    is the long time it takes to load each tables fields into the meta
    data.

    My setup is: RB7.02 D6 dade with ADO, dictionary. I have about 457
    tables with fieldcounts ranging from 3 (lots) to some very wide
    tables. Current average fields per table is 14.

    I have a gMetaDataManager.GetTables followed by a loop through all of
    the tables doing a gMetaDataManager.GetFields

    Taking a random selection of tables it seems to take (on my Win2k box
    under the debugger) about 60 seconds to do only 20 tables (ie 3
    seconds per table).

    Is this what your timings or performance goals would be? Am I doing
    something wrong? How can I greatly decrease the time this takes?

    Thanks,


This discussion has been closed.