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

HELP!!!!!!!! Questions on DataViews (DBISAM)

edited August 2002 in DADE
I am using DBISAM, but I think this applies to everything.

I have an application where there can be different reports open at the same
time (MDI). In addition, these reports can point to different DBISAM tables
that I created in a temporary directory. Since these DBISAM tables are in
different directories, I setup my DBISAM database directory to point to
different directories. All the DBISAM tables therefore point to different
DBISAM databases. They all have the same table name - 'reportdata'. DBISAM
has a stipulation that you need to make sure the DBISAM database component
name has the same name as the DBISAM databasename property - this is true
(although the name is unique everytime the report is created to allow
multiple DBISAM tables). When I display the designer, I set the database
name to the name of my unique DBISAM database component.

When I first display the report and create a new dataview, all is good. The
data is loaded properly from my temporary DBISAM table. However, the problem
comes into play when opening a report. After recreating a DBISAM table in a
directory (different directory then when the report was created because it
is unique), with a different DBISAM database component name (again a unique
name), and reopening the report, when I do set each dataview to be active, I
receive an error message that the 'reportdata.dat' file is not located in
the directory where the executable is (it would never be in here - it is
always in a unique directory in Windows/Temp. Therefore, my report does not
open. However, if I go into the designer and on the Data tab select the
dataview and click the Tables button and immediately click OK, when I click
the Preview button, the data is loaded!

My questions are:
1. Is the way that I am using DBISAM correct? Should I have only one DBISAM
database component pointing to a common directory and the table names are
unique?
2. Since all I needed to do in order to make the dataview load properly was
click the Tables button and click OK, what is the equivalent in code? I
tried OutOfSync and Sync but that did not work. Obviously the problem
appears that the dataview was saved with one databasename but now that
databasename is different and by clicking the Tables button (actually any of
them except the Preview) after clicking the OK button, if I click the
Preview button the data is loaded properly. I just need to know what is
changed by clicking one of the toolbar buttons on the Data tab.
3. Should I persist the unqiue database names and use it everytime the
report is generated? The problem with this scenario is that I cannot allow
the user to display the same report because the databases will be pointing
to the exact directory (although the data may be different). Weird things
may occur.

Thank you.

Comments

  • edited August 2002
    You should use one DBISAM database connected to the Designer.Datasettings
    property. DADE only supports one database at a time. When you load a
    template, the database name in the datasettings needs to match the database
    name that the dataview was saved down with.


    Cheers,

    Jim Bennett
    Digital Metaphors

This discussion has been closed.