Starting a Server

edited February 2007 in Server
I have a server that has 4 volumes. Also I have a ini file that loads
settings for a database and other items before anything happens. Well that
is what I thought!

The problem is this, the application starts and before any ini settings
are loaded the 4 volumes are connecting to a database. This is fine in
development but causes some headaches. I don't know what the end databases
will be hence the ini file. How do I stop the server from trying to start
before I have read in the ini file settings for the server and datamodules?

Regards
Charles

--- posted by geoForum on http://delphi.newswhat.com

Comments

  • edited February 2007

    - each ReportVolume should reside on a separate DataModule with a database
    connection object.

    - at design-time, set the database connection object property for
    Connected/Active to False prior to saving the datamodule. (Otherwise as soon
    as the datamodule is created, it will try to connect to the database before
    your code can read the ini file).

    - use the DataModule.OnCreate event to read the .ini file and configure the
    connection object


    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.