separate configs?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • LLM
    New Member
    • Apr 2007
    • 23

    separate configs?

    I'm looking to have my application accept a command line argument to specify if the user wants to use the training system or the live system. What is best practive for the db connection string?

    Should I store 2 in the config and set the connection string globally based off the command line?

    Or can I have 2 config files and switch which I read from?

    Help is appreciated!
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    If the connection string for the database is the only that is going to switch, I would say just keep both of them in one config and change based on your command argument.
    If you want to switch a lot of things, well I guess I would say seperate them out. Not quite sure how to use multiple config files the same user, but i *think* it can be done?

    Comment

    Working...