Home DADE

TdaSession.Getdatabaseforname during runtime

edited August 2004 in DADE
I am using Intraweb 7 with Delphi 6 and RB 7. We are also using DBisam as
Database engine.
I just created a report using PPreport (queries and code were done in the
report ) object only (I used to add Query and Datapipeline components).
When I try to run it I get the following error:
TdaSession.Getdatabaseforname : no Tdbisam object found for specified name,
A separate Database connection is required for each thread.
is there a way to specify the database session used by the report during
runtime.
Thanks,

Comments

  • edited August 2004

    You need to create a thread-safe container for the report. I recommend that
    you use a TDataModule. Place the TppReport and a TDBISAMDatabase component
    on the datamodule. From the Data workspace of the Report Designer, select
    File | Datasettings and configure the datasettings to use the
    TDBISAMDatabase component. Now delete the old queries and create new ones
    using the new datasettings. Each web request should create a separate
    instance of datamodule - and thus a separete report instance and associated
    database connection object.

    1. If you are building a web application, you may want to consider using RB
    Server Edition to implement the web reporting and then invoke it from your
    intra web app.

    Live Demo: www.digital-metaphors.com/RBServerLive

    Features:
    http://www.digital-metaphors.com/Subpages/Products/Server/Features.html


    2. There is some good information on thread-safety in the online help topic
    for TppReport.BackgroundPrintSettings. The Background printing feature was
    added as of RB 7.02...





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



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited August 2004
    that fixed it.
    Thanks alot for your help.
This discussion has been closed.