Problem with ADOComponents.DefaultDatabase

I'm having big trouble trying to use ADOComponents.DefaultDatabase.
I can set the property at designtime, but at runtime it's always nil.

Any Ado component I add to the report can't find the connection.

I've also put a
ADOComponents.DefaultDatabase:=myConnection;
in a Form_create event, and the defaultdatabase is nil when I start creating a new report.

Is there a way to make FR4 aware of my Adoconnection (myConnection) ?
Any AdoQery or AdoTable can't see the connection, and is not initialized with Defaultdatabase.

Setting a breakpoint in
TfrxADOQuery.SetDatabase()
I can see that ADOComponents.DefaultDatabase is nil at runtime.

Comments

  • edited 6:45PM
    sebastiani wrote: »
    I'm having big trouble trying to use ADOComponents.DefaultDatabase.
    I can set the property at designtime, but at runtime it's always nil.

    Any Ado component I add to the report can't find the connection.

    I've also put a
    ADOComponents.DefaultDatabase:=myConnection;
    in a Form_create event, and the defaultdatabase is nil when I start creating a new report.

    Is there a way to make FR4 aware of my Adoconnection (myConnection) ?
    Any AdoQery or AdoTable can't see the connection, and is not initialized with Defaultdatabase.

    Setting a breakpoint in
    TfrxADOQuery.SetDatabase()
    I can see that ADOComponents.DefaultDatabase is nil at runtime.
  • edited 6:45PM

    What is the type of myconnection object did you use ?

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.