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

RB 5.56 Query Wizard and Designer

edited February 2003 in DADE

Try to get the Designed to see my data tables and I can see them in
the Query Wizard fine, however I get an
"TdaMetaData.GetFieldsFromDataSet: Unable to open dataset: xxx.dat"
error when I try to move further through the wizard. Now if the
database files are in the app's folder it's no problem. How is it the
wizard can see the tables but when it tries to access them it's
expecting them to be in the app's folder?

Also when I have a report with a Query Wizard set-up and I preview the
report, or save the report dfm file I can't release it's control on
the table for deleting. I'm currently copying required records to the
app's folder to limit the records available and wish to delete these
files after the report designer has finished with them. This works OK
of I don't preview, or save the report. The report viewer/preview (no
designer) releases the files fine and I can delete them.

I've tried switching all the databases off, as well as clear fields in
the report components to no avail.

Any help here?

I'm working with the DBISAM database and this seems to be working fine
and I can only assume it's all a EB issue somewhere.

Charles

Comments

  • edited February 2003
    DBISAM works fine in tests here. It sounds as if your datasettings on the
    designer have changed, which is why the meta data cache can't find the
    table. You need to clear the meta data cache at runtime after you change the
    datasettings. Are you using the data dictionary? Disconnect the data
    dictionary to see if the problem goes away. Did you populate the data
    dictionary to include both the tables and fields? Can you run our end user
    DBISAM demo project?

    ----------------------------------------
    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
    daMetaData;

    begin
    gMetaData.Clear;

    end;


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited February 2003

  • edited February 2003
    Create a simple test project based on our DBISAM end user demo with the data
    dictionary and its data access components deleted.

    When are you creating/destroying the temporary tables? You will want to
    clear the meta data cache if you are creating the tables at runtime and if
    they are differently named or don't exist. The dataviews store the table
    name along with the datasettings that should be used to create this query at
    runtime. The dataviews you create in the Data tab, are actually creating a
    TDBISAMQuery, TDatasource and TppDBPipeline behind the scenes, just as you
    would on a form if you created them. The meta data cache is used to get
    information about the table and field names from the database by only
    hitting it once to get the table names and field names are retrieved as
    needed.

    Open up RBuilder\Source\ppMetaData.pas and see what the interface on the
    meta data cache class looks like for a clear call.

    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited February 2003


    I have done this, of sorts and have it working fine. Temp DB files
    delete fine. I'll now re-visit my project which doesn't work and try
    and mirror the working system better. Thanks.
This discussion has been closed.