rbWiki

Digital Metaphors Knowledge Base Wiki

  • Home
DADE » MetaData »

TdaMetaCache Errors

  • Last update on June 8, 2017
  • under MetaData

TECH TIP: Troubleshooting TdaMetache Errors

Issue
Running a report and/or acessing the Query tools, results in the following error…

Error: TdaMetacache.GetFields unable to find table ‘tablename’ in cache”

Solution
This error indicates an issue with the database connectivity settings for either the Query tools or the report’s DataViews.

The Designer’s DataSettings are used to specify the database connection that is used by the Query tools to create new queries and edit existing queries. Once a query dataview has been created, the database connection information is saved as part of the dataview definition.

At Delphi design-time the Designer’s DataSettings are loaded/saved from RBuilder.ini. They can be modified by accessing the File | DataSettings dialog from the Data workspace of the Report Designer.

At run-time the TppDesigner.DataSettings values are used to specify the data connection. The TppDesigner.AllowDataSettingsChange can be used to control whether the DataSettings dialog is accessible from the report designer.

Digital Metaphors recommends that in all cases the database connection be specified in the following manner.

  1. Use a Database Connection component that resides on a form/datamodule. For example, if you are using ADO, place a TADOConnection component on the form/datamodule that contains the report.
  2. Configure the Designer DataSettings DatabaseName property to reference the Database connection component.
  3. Use the Database Connection component to specify the connection parameters for the database.

This results in the following:

Designer DataSettings --> Database Connection component

Report DataViews ---> Database Connection component

With the above configuration, the Dataview definitions will never directly reference a database connection. This enables the Database connection component to be modified for deployment without breaking any reports.

The new connection settings will automatically be used by all existing reports and the query tools.

Note: The ReportBuilder Data workspace is designed to be used with only a single database connection at any one time. To speed performance, there is a global meta data cache that 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;

 

About Nico Cizik

View all posts by Nico Cizik →
← How To…Use the DataDictionary Builder at Run-Time
How To…Control Security →

Categories

  • DADE
    • Database Plugins
    • Features
    • Fundamentals
    • Linking Datavews
    • MetaData
    • Program Control
    • SQLBuilder
  • Data Access
    • Database
    • Fundamentals
    • JIT Data
    • TextFile Data
    • Troubleshooting
  • Delphi Code
    • Calculations
    • Event Firing
    • Formatting
    • Layouts
  • Design
    • Crosstabs
    • Features
    • Formatting
    • Forms
    • Groups
    • Labels
    • Layout
    • Pagination
    • Templates
  • End-User
    • Designer
    • Features
    • Fundamentals
    • Report Explorer
  • General
    • Deploy
    • Getting Started
    • Installation
    • International
    • Platforms
    • What's New
  • Output
    • Archive
    • Cloud Drive
    • Email
    • Features
    • Image
    • Overview
    • PDF
    • Preview
    • Printer
    • Report Text
    • RTF
  • Plugins
    • Dialogs
    • Features
    • General
    • Wizards
  • RAP
    • Calculations
    • Extending RAP
    • Features
    • Fundamentals
  • RCL
    • Barcode
    • Chart
    • Fundamentals
    • Images
    • PaintBox
    • PDFComponent
    • RichText
    • TableGrid
  • REST
    • Client (FMX)
    • Server
  • Server
    • Client
    • Features
    • Fundamentals
    • Report Server
    • Troubleshooting
    • Web Tier
Digital Metaphors Corporation
Copyright 2024