Home DADE

TdaMetaCache.GetFields error

edited September 2006 in DADE
I'm running RB 7 with Delphi 5, and get the following exception:
"TdaMetaCache.GetFields: unable to find table in cache" when
printing/viewing reports (EDesignError in TdaMetaData.GetFields). This is
not 100% repeatable, but occurs frequently enough to cause problems for our
customers.

The Report Builder functionality is implemented as a DLL, with calls to
display the report designer, preview a report, print a report etc.

I'm using a data dictionary which is populated at run time for the database
selected by the user. The data dictionary tables are implemented in Paradox
at the moment, and these are definitely populated with the correct
dictionary data when the exception occurs.

This error does not occur if I first run the report designer and create a
simple data set (not necessarily related to the report data), then open a
different report, or exit the designer - I guess there's some initialisation
going on in this case which prevents the error.

Any ideas would be most welcome.

Thanks
Paul Gammaidoni

Comments

  • edited September 2006

    - make sure that DataDictionary.UseTableOwnerName is set to false.

    - RB internally caches information about the available tables in the
    database. If some reports use a different database, that could cause an
    error. You can manually clear the meta data cache, see example below.

    ----------------------------------------
    Tech Tip: Clearing the Meta Data Cache
    ----------------------------------------

    There is a global meta data cache that the ReportBuilder uses to cache
    information about the available database tables and fields. You can clear
    the meta data cache using the following code.

    uses
    daMetaDataManager;

    begin
    gMetaDataManager.Clear;

    end;

    --
    Tech Support mailto:support@digital-metaphors.com
    Digital Metaphors http://www.digital-metaphors.com


    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.