Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004

    Unhappy Unanswered: runtime connection to DB,Delphi 6

    hi there! i am developing an application in Delphi 6.i set the connection String in design time to a local database. when i take the application to other machine it does not run.i found out that i looks for the path i set in my machine and it does not find it. so i need to connect to the database at run time... need some code! i am Using ADOTable.

    Thanx in advance


  2. #2
    Join Date
    Mar 2004
    Calgary, AB Canada
    The last thing I do before my final build is to de-activate all my connections - I've had that same problem many times.

    I handle the runtime aspect in one of three ways:
    1) I have the connection string in an .ini file
    2) I have the connection string in the registry
    3) I pass part or all of the connection string as a command line parameter.

    I have my tables, datasets, connections, etc. in a datamodule. In the .OnCreate event of the datamodule is where I get the connection string and assign it.

    Good luck,


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts