Error in TDASession - Service-application
?Hi,
i am building a service application with a lot of threads. In one thread
i am creating an TppReport-object and try to print a report (using also
the DOA-Oracle-Plugin).
Now i got the error:
TdaSession.GetDatabaseForName: No TOracleSession object found for
specified name, cvs. A separate database connection is required for each
thread.
I have already a DOA-database session created in this thread (inherited
from TThread). How can i register this session to the reportengine. I am
not using any forms or datamodules in my service application.
Best regards
Sven Heuer
Delphi 7. RB 9 Enterprise-Edition
--- posted by geoForum on http://delphi.newswhat.com
i am building a service application with a lot of threads. In one thread
i am creating an TppReport-object and try to print a report (using also
the DOA-Oracle-Plugin).
Now i got the error:
TdaSession.GetDatabaseForName: No TOracleSession object found for
specified name, cvs. A separate database connection is required for each
thread.
I have already a DOA-database session created in this thread (inherited
from TThread). How can i register this session to the reportengine. I am
not using any forms or datamodules in my service application.
Best regards
Sven Heuer
Delphi 7. RB 9 Enterprise-Edition
--- posted by geoForum on http://delphi.newswhat.com
This discussion has been closed.
Comments
- The Report component and associated data access components, including the
TOracleSession, need to have a common Owner. Typically the Owner is a
TDataModule/TForm upon which the Report resides.
- the TOracleSession Name needs to reflect that
Designer.Datasettings.DatabaseName that you used at the time you created the
report.
- You can modify the DADE plug-in for DOA if you wish to implement an
alternative strategy. Based on your description, I would try modifying
TdaDOASession.GetDatabaseNames to add the TOracleSession instance for the
relevant thread. That will likely get it working. If not trace the code in
daDB.pas for the method, TdaSession.GetDatabaseForName. You can also
override this method in the TdaDOASession descendant class.
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com