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

ADO Connection & dataview templates

edited August 2003 in End User
Is there a way to use the ADO connection setup in the designer object in a
custom dataview template. I seem to have use the ADO connection object in a
DataModule and assign this connection to my ADO object when I create them in
the custom dataview template.

I have also tried assigning the "DefaultADOConnection" from the
TdaADOSession class which does not have a valid connection string. FADOQuery
is my query object of type TdaChildADOQuery for the dataview class

FADOQuery := TdaADOSession(Session).GetDefaultADOConnection;

I would like to keep my dataview templates separate from my applications
datamodule and use whatever the designer is using for its connection

You help would be appreciated

Justin

Comments

  • edited August 2003
    You do not want to use the DefaultADOConnection. That gets created as a last
    chance effort to connect to data when the dataview cannot find your
    ADOConnection on any of your app's forms or datamodules. The report
    designer should use the same ADOConnection object from your main
    application. If you want to keep it separate, then create a new
    ADOConnection and duplicate the properties, but this isn't really necessary
    since you only need one connection in your app that all data access
    components can use. This way you'll only need to setup the login info on one
    ADOConnection object in the app, instead of trying to manage two
    ADOConnections.


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.