Home DADE

BDE to ADO conversion question

edited October 2006 in DADE
I am using Delphi 7, RB 7.01, ADO and MS SQL Server 7/2000/2005.

I have a global TADOConnection that gets assigned to the custom TADOQuery
components at runtime. This was done to ease the BDE to ADO conversion.

Is there a way to have the TddDataDictionary.BuilderSettings.DatabaseName
reference a connection that is not on the form? It works great if I put a
TADOConnection on the form, but not if the ADOConnection gets assigned at
runtime.

I tried working around it by having a local TADOConnection and pointing it
to the global one so the DatabaseName dropdown showed it, but I get the same
error.

"Data source name not found and no default driver specified..."

Any ideas?

Comments

  • edited October 2006
    This question has been answered in the End-User newsgroup. Please do not
    cross post.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited October 2006
    Wow.

    Thanks for reading past the subject. Can you have another look?

  • edited October 2006
    Hi Isaac,

    I sincerely apologize, usually when I see the same subject for a post from
    the same person, I assume it is a cross post :).


    Where is this global ADO connection located and what is its owner? If you
    take a look at the daADO.pas file in the TdaADOSession.GetDatabaseNames
    routine you will see that ReportBuilder searches through each form and
    datamodule to compile a list of available ADO connections. You could alter
    this code to include your global ADO connection as well.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited October 2006
    >

    Thanks Nico. I'll try to make a better subject line next time.

    The global connection does now have an owner and it's created in the
    initialization section so that my queries will work in the Delphi IDE. I
    got around the problem by adding a connection component to my report writer
    form and assigning the ConnectionObject from my global. This worked out
    better for my "cross post" issue (hehe) where I want to load legacy BDE
    reports since the database name stored in the reports was different than my
    global.
This discussion has been closed.